1. How to Implement Better PHP REST API Exception Handling Adding More Details About the Exception Context
Updated on: 2021-03-06
Posted on: 2021-03-06
Exceptions are special kind of class that is useful to pass details of errors that may happen within an application.
Usually exception classes carry information about the errors that includes an error message and an error code that can be useful to help applications to treat the errors in a a more convenient way for its users.
This package extends the information that is usually stored in an exception class. It adds details like the HTTP status code, request body and request URL, which may be useful for instance to generate error logs for applications that implement APIs.
More ... Post a comment See comments (0) Trackbacks (0)
Usually exception classes carry information about the errors that includes an error message and an error code that can be useful to help applications to treat the errors in a a more convenient way for its users.
This package extends the information that is usually stored in an exception class. It adds details like the HTTP status code, request body and request URL, which may be useful for instance to generate error logs for applications that implement APIs.
More ... Post a comment See comments (0) Trackbacks (0)