Why does an error response have the code 200! i never got the response i expected so why give me a 200! This is dumb
Error with status code 200
Started by Trenix [2264772] on in API Development.
About this thread
Posts archived: 4 / 4 posts (100%) · the total is Torn's reply count + the opening post at the last fetch
Counted by TornLife from the archived posts.
- Archived posts
- 4
- Discussion span
- →
- People posting
- 3
- Likes on archived posts
- 1
- Authority score
- 50 / 100
- Historical score
- 19 / 100
- Story score
- 24 / 100
- Engagement score
- 42 / 100
For the Torn api Http responses represent issues related to http. When there are api issues you’ll have a populated Json “error” object.
This is how Torn does it and it’s annoying.
This is how Torn does it and it’s annoying.
It makes sense - an HTTP standard may not provide error codes suitable for the range of things that affect an API.
You're right, but there are some that I would like to see used.
204 - No content
400 - bad request
404 - Not found. If you hit something like https://api.torn.com/asdf/1 you get a json response with "invalid api key".
429 - Too Many Requests. Useful for rate limiting
204 - No content
400 - bad request
404 - Not found. If you hit something like https://api.torn.com/asdf/1 you get a json response with "invalid api key".
429 - Too Many Requests. Useful for rate limiting