Closed sachin-sankar closed 3 years ago
The status code when a non premium api key is used in a request(ai) is
401
which is same as Unauthorized. Different status code for this type error would be great.
But I think it's correct Because if you don't have premium then you are unauthorised
Different status codes for different errors would greatly improve the back end performance of the api
We can use 402
Response code.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402
It Looks like I won't be able to fix it since ExpressJS Doesn't provide that facility in the version I am using. I will upgrade the version once my exams are finished i.e in about a week
The status code when a non premium api key is used in a request(ai) is
401
which is same as Unauthorized. Different status code for this type error would be great.