not_found error
not_found is returned with HTTP 404. Retryable: no. Sending the same request again returns the same error. Nothing is charged for this error.
What it means
Nothing exists at this address.
Most likely cause
What the request names does not exist for this account. The usual case is opening the billing portal before the account has a billing profile, which the first plan purchase creates.
How to fix it
Check the path and any ids in it against the API reference, then retry.
Example
The billing portal uses the signed-in dashboard session token, not an API key. For an account that has never started a plan, this call returns HTTP 404.
curl -i -X POST https://YOUR_API_HOST/v1/me/billing/portal -H "Authorization: Bearer $FIREBASE_ID_TOKEN" -H "Content-Type: application/json" -d '{}'
An error response is one JSON envelope. Branch on code, never on the message text. The message and fix of a real response can be more specific than the defaults shown here.
{
"error": {
"code": "not_found",
"message": "Nothing exists at this address.",
"fix": "Check the path and any ids in it against the API reference, then retry.",
"docs_url": "https://lookvalid.com/docs/errors/not_found",
"retryable": false,
"request_id": "req_3fK9pQ2xVb7LmN4sTz8WcA"
}
}
See also
- All error codes with the response envelope.
- Credits and billing.
- Quote the
request_idwhen you write to hello@lookvalid.com.