mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Log errors that occur in the API stack
This takes place only in the FallbackExceptionHandler. Having a custom exception handler implies that a friendly message is displayed in the API response, in which case we can bet that the exception won't need to be "debugged" per se.
This commit is contained in:
@@ -25,7 +25,6 @@ use Flarum\Http\RouteCollection;
|
||||
use Flarum\Http\RouteHandlerFactory;
|
||||
use Flarum\Http\UrlGenerator;
|
||||
use Tobscure\JsonApi\ErrorHandler;
|
||||
use Tobscure\JsonApi\Exception\Handler\FallbackExceptionHandler;
|
||||
use Tobscure\JsonApi\Exception\Handler\InvalidParameterExceptionHandler;
|
||||
use Zend\Stratigility\MiddlewarePipe;
|
||||
|
||||
@@ -80,7 +79,7 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||
$handler->registerHandler(new ExceptionHandler\TokenMismatchExceptionHandler);
|
||||
$handler->registerHandler(new ExceptionHandler\ValidationExceptionHandler);
|
||||
$handler->registerHandler(new InvalidParameterExceptionHandler);
|
||||
$handler->registerHandler(new FallbackExceptionHandler($this->app->inDebugMode()));
|
||||
$handler->registerHandler(new ExceptionHandler\FallbackExceptionHandler($this->app->inDebugMode(), $this->app->make('log')));
|
||||
|
||||
return $handler;
|
||||
});
|
||||
|
Reference in New Issue
Block a user