#iloveitaly_error

1 messages ¡ Page 1 of 1 (latest)

turbid hamletBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1409514968008757370

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

eternal marten
turbid hamletBOT
oak canopy
#

I don't have one. Here's the code I was using to report these.

export function checkoutHasError(
  confirmResult: StripeCheckoutConfirmResult,
): boolean {
  if (confirmResult.type === "error") {
    const error = confirmResult.error

    /* Some errors that come back from Stripe are not the thing we want users to see

        {
      "error": {
        "code": "resource_missing",
        "doc_url": "https://stripe.com/docs/error-codes/resource-missing",
        "message": "No such payment_page: 'ppage_1RqKufAYqNCz8J9WmkiBcG2H'",
        "param": "payment_page",
        "type": "invalid_request_error"
      }
    }

    We are tracking these to see what we should end up doing about them
    */

    // TODO reenable if you want more fine-grained error reporting
    const errorMessage = `Checkout confirmation failed: ${error.message || "Unknown error"}`
    // Report to Sentry with additional context
    Sentry.captureMessage(errorMessage, {
      extra: {
        checkoutError: error,
      },
      level: "error",
    })

    return true
  }

  return false
}

What is odd is normally that checkoutError object would contain a request ID, but in this case, it doesn't and it's completely empty.

{
__error: {},
code: null,
message: Please provide a mobile phone number.
}