-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use heimdal ExceptionHandler just in API #16
Comments
I've found a solution, but I do not know if it's for the best.
public function render($request, Exception $exception)
{
if($request->is('api/*')) {
$handler = new \Optimus\Heimdal\ExceptionHandler($this->container);
return $handler->render($request, $exception);
}
return parent::render($request, $exception);
} |
VictorAssis
changed the title
Usei heimdal ExceptionHandler just in API
Use heimdal ExceptionHandler just in API
Sep 21, 2017
Thanks for the solution @VictorAssis
If anyone needs to use reporter from the library for web |
You can also detect request type (API/web) during binding procedure and provide appropriate ExceptionHandler class.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I am creating the API of a system that already has an administrator module running today. Is it possible for Laravel to use the Heindal Handler only in the API module?
The text was updated successfully, but these errors were encountered: