Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper rejection
Message
 
 
General information
Forum:
AngularJS
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01653655
Message ID:
01653743
Views:
26
>If the only consumer of the $http call will be your own browser code then you could pick any (maybe 418 or 420 :-} ) - or even define your own codes for the errors that are caught.
>You could define and document a whole bunch of custom status codes specific to the application. Or pick one code and include more specific information in the response body.....
>
>
>If the call may be made by other clients then it's a question of picking the best fit - if the error is in the client request then pick one of the 400 codes; if on the server then 5xx....
>
>Good decision tree for Rest error codes here : http://racksburg.com/choosing-an-http-status-code/

Hi Viv,

Thanks for the response, I'll study the document. This is our own application that will be used by our clients to configure their database to be then used by our POS Sales application.

For the original purpose of my question I already decided to just return OK status with the error message and handled it this way. But I may need to use custom Http codes for other parts of functionality.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform