Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge b48d1fa into 78f39a3
Browse files Browse the repository at this point in the history
  • Loading branch information
puzakov committed Feb 5, 2016
2 parents 78f39a3 + b48d1fa commit ef85d85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EventListener/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace KleijnWeb\SwaggerBundle\EventListener;

use KleijnWeb\SwaggerBundle\Exception\InvalidParametersException;
use KleijnWeb\SwaggerBundle\Response\VndErrorResponse;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -72,7 +73,7 @@ public function onKernelException(GetResponseForExceptionEvent $event)
} else {
switch (substr($code, 0, 1)) {
case '4':
$message = 'Input Error';
$message = get_class($exception) === InvalidParametersException::class ? $exception->getMessage() : 'Input Error';
$this->logger->notice("Input error [logref $logRef]: " . $exception->__toString());
break;
case '5':
Expand Down

0 comments on commit ef85d85

Please sign in to comment.