Spray.io REST service - Http Error Codes - Lesson 8
View the lessons list at https://github.com/karthik20522/SprayLearning
In the previous post in this series about Spray.io REST API, I talked about simple error handling and rejections. What about errors in the context of RESTful API best practices? From the perspective of the developer consuming your Web API, everything is a black box. When developing their applications, developers depend on well-designed errors when they are troubleshooting and resolving issues when using your API.
There are over 70 HTTP status codes but offcourse we don't need to use all of them. Check out this good Wikipedia entry for all HTTP Status codes. So in Spray, we basically can implement all the status codes in the complete magnet depending on if its an Exception or Rejection.
Checkout out these error/httpStatus code from various RestAPIs:
<< Home