kevindierkx / elicit

[DEPRECATED] An API toolkit for PHP.
https://packagist.org/packages/kevindierkx/elicit
MIT License
2 stars 0 forks source link

Add support for error processing #3

Open nielstholenaar opened 9 years ago

nielstholenaar commented 9 years ago

Some API's may provided errors within the response body. Currently the only place to handle those errors is within the Processor.

I think you should consider adding an better place to handle errors. Something like an dedicated error handling processor.

kevindierkx commented 9 years ago

I'll be adding that in the near future. Currently 401 and 404 status codes are already caught. 401's are returned with a Kevindierkx/Elicit/Connection/InvalidCrendentialsException and 404's result in a empty model, these can throw a Kevindierkx/Elicit/Elicit/ModelNotFoundException when used with a $model->findOrFail()