DEV Community

Cover image for HOW TO HANDLE API ERRORS IN LARAVEL
Hamidreza Hassani
Hamidreza Hassani

Posted on

HOW TO HANDLE API ERRORS IN LARAVEL

Hi Guys .
as you know Laravel can handle error as well. but when you develop an API you will know that it's not good for API exceptions. so if we want to handle api errors in best way we should write a code and put it in app\Exceptions\Handler.php. and if we want to use that code in another project we have to copy that and paste in our project . so I decided to create a package laravel-api-error-handler.
this package can handle your api error easily.
you must only determine what handler handle what error; and all of things are OK!

GitHub logo hamidreza2005 / laravel-api-error-handler

a useful package for handle your exception when you are developing a API

Top comments (0)