Avoid Using Exceptions to Determine API Status Codes and Responses

added by DotNetKicks
11/16/2021 8:19:19 PM

385 Views

It's typical for API endpoints to call application or domain services. In the case of success, the API can simply return Ok and the result of the service call. But for non-success cases, should you use exceptions to communicate from the service to the endpoint, so that it can return an appropriate status code and response?


0 comments