dev-master
9999999-dev https://github.com/tarun-singhal/AppErrorManagerTo caputure the Api Errors/Exceptions in Apigility or REST API.
The Requires
- php >=5.3
by Tarun Singhal
api zf2 exception apigility error manager
Wallogit.com
2017 © Pedro Peláez
To caputure the Api Errors/Exceptions in Apigility or REST API.
AppErrorManager is used to capture the API error and exception on fly. It is very usefull to manage the single place to capture the error message and error code., (*1)
Step 1 :To enable the Module in ZF2, Include the module name inside application.config.php file, (*2)
return array( ..., ..., 'ErrorManager' );
Step 2: now if you want to capture the api exception then change in ApiProblem i.e. new ApiProblem(200, '1001'); where, '1001' : is the error code,, (*3)
Step 3: Open the config/Error.ini file, please the error code inside that like as below:, (*4)
[test.rest.respapiname] 1001 = api problem found
Step 4: Now you can manage the api code and message at one place., (*5)
I hope it will help you to handle exception/error and to identify the actual debug happening in the API Calls., (*6)
To caputure the Api Errors/Exceptions in Apigility or REST API.
api zf2 exception apigility error manager