Site
Home / Forum / Developers / Response codes for invalid requests

Response codes for invalid requests


Posted: 14 May 2019 09:42

jelles
Posts: 1
Joined: May 2019

https://www.thesportsdb.com/api/v1/json ... hp?id=Fake returns following repsonse:

{
"events": "Invalid League ID passed"
}

with a status code of 200. I would suggest following changes:

Since this is basically a "bad" request, maybe return a status code 400 (or 404)?
Maybe the error message should have a key other than "events"?

Thoughts?

Posted: 14 May 2019 09:44

zag
Posts: 1,558
Joined: Oct 2016

Yes I have been wondering this myself, do you have a suggestion of the exact JSON data that should be returned?


Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 2 (Total: 2)