Where to find all values of error type?

Hi,

Where to find all values of error type?

I.e. for insufficient quota I’ve got following json

entity: {
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}

The page “Error codes” contains only http-codes and Python library error types - https://platform.openai.com/docs/guides/error-codes/api-errors

So, where is a list of all values for field “type”?

Or values of field “type” meaningless and I have to use http-codes only?

Thanks,
Sergio

1 Like

This error is covered under code 429 on the link you shared.

429 - You exceeded your current quota, please check your plan and billing details
Cause: You have hit your maximum monthly spend (hard limit) which you can view in the account billing section.
Solution: Apply for a quota increase.

chatGPT, please summary the question:

chatGPT:

The question is asking where to find a comprehensive list of all error types for a particular API or service. The provided example shows an error message with a specific error type of “insufficient_quota”. The “Error codes” page mentioned only contains HTTP status codes and Python library error types, which may not include a list of all possible error types for the API or service being used. The question is asking whether the “type” field is meaningful and if a list of its values can be found or if it is necessary to rely on HTTP status codes only.

1 Like

That link gives two very different meanings for 429:

429 - Rate limit reached for requests

429 - You exceeded your current quota, please check your plan and billing details

1 Like

Hello everyone,

I’m reviving this thread, because I think that it’s crucial to have more documentation for errors returned through JSON responses.

Some HTTP codes are bundled together for multiple errors, such as 429, which is both “Rate limit reached for requests” and “You exceeded your current quota”.

An end user should know that a rate limit has been reached, so they halt their requests for a bit, but they shouldn’t know whether or not the quota has been exceeded. That’s the dev’s problem.

Unless my googling skills are very out of touch, I was unable to find any information on these JSON error types. Any assistance from the OpenAI team would be highly appreciated (ideally, documentation additions).

https://platform.openai.com/docs/guides/error-codes/api-errors

You shouldn’t be reporting on either rate as a problem with what the user is doing. You should be managing what you send and your capability (tier) to service customers so you don’t get errors.

2 Likes

There are cases (even if rare) where you have to report on rates, you can’t just make users wait by using back offs in order to manage tier limits.

Sure you can.

image

It’s better than “our account is over its rate limit, try your request later, because we won’t be solving that any time soon”.

That’s fair, however the 429 HTTP code meaning two things at once still does bother me a bit.

Also, I get the “We’re really busy, try later” message, didn’t think of that one :slightly_smiling_face:

HTTP has a limited number of response status codes. You would not want to extend the protocol inappropriately in a proprietary fashion, for example returning a 418 just because it is convenient code you think you can use to communicate.

Maybe 402: “Pay up, this isn’t free” would be appropriate for a subcategory of errors.

Well, obviously you don’t want to extend the protocol, that would cause nothing but confusion. I do agree with the 402 sub-error. So, you know… nudges OpenAI engineers