PHP Trait Flugg\Responder\Traits\HandlesApiErrors

Author: Alexander Tømmerås ([email protected])
Datei anzeigen Open project: flugger/laravel-responder

Protected Methods

Method Description
renderApiError ( ApiException $exception ) : Illuminate\Http\JsonResponse Renders any API exception into a JSON error response.
transformAuthException ( Exception $exception ) : void Transform a Laravel auth exception into an API exception.
transformEloquentException ( Exception $exception ) : void Transform an Eloquent exception into an API exception.
transformException ( Exception $exception ) : void Transform a Laravel exception into an API exception.
transformValidationException ( Exception $exception ) : void Transform a Laravel validation exception into an API exception.

Method Details

renderApiError() protected method

Renders any API exception into a JSON error response.
protected renderApiError ( ApiException $exception ) : Illuminate\Http\JsonResponse
$exception Flugg\Responder\Exceptions\Http\ApiException
return Illuminate\Http\JsonResponse

transformAuthException() protected method

Transform a Laravel auth exception into an API exception.
protected transformAuthException ( Exception $exception ) : void
$exception Exception
return void

transformEloquentException() protected method

Transform an Eloquent exception into an API exception.
protected transformEloquentException ( Exception $exception ) : void
$exception Exception
return void

transformException() protected method

Transform a Laravel exception into an API exception.
protected transformException ( Exception $exception ) : void
$exception Exception
return void

transformValidationException() protected method

Transform a Laravel validation exception into an API exception.
protected transformValidationException ( Exception $exception ) : void
$exception Exception
return void