PHP Trait Flugg\Responder\Traits\HandlesApiErrors

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

Méthodes protégées

Méthode 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 méthode

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

transformAuthException() protected méthode

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

transformEloquentException() protected méthode

Transform an Eloquent exception into an API exception.
protected transformEloquentException ( Exception $exception ) : void
$exception Exception
Résultat void

transformException() protected méthode

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

transformValidationException() protected méthode

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