Documentation/Guides
Errors | Baseball Data API
ErrorsEvery code, and what to do.
A failure is {"error": {"code", "message", "docs"}}. The code is for your code and never changes; the message is for people.
| Code | HTTP | What to do |
|---|---|---|
bad_request | 400 | A value was not what was expected; the message says which. |
unauthorized | 401 | Send an active key in a header. |
upgrade_required | 403 | Not on your plan; the answer names it. |
not_found | 404 | No such thing. An empty list is a 200, never a 404. |
method_not_allowed | 405 | Every call is GET. |
unknown_parameter | 422 | Remove it; the answer lists the allowed ones. |
rate_limited | 429 | Slow down; wait for Retry-After. |
quota_exceeded | 429 | The day's calls are used; it resets at 00:00 UTC. |
server_error | 500 | Our side; it has been logged. Try again shortly. |