Commit 5c7cce86 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

UploadController: correction du JSON renvoyé en cas d'exception.

Showing with 2 additions and 2 deletions
+2 -2
......@@ -279,14 +279,14 @@ class UploadController extends Controller
{
return $this->createResponse(
$ex instanceof HttpException ? $ex->getStatusCode() : Response::HTTP_INTERNAL_SERVER_ERROR,
$ex->getMessage(),
preg_replace("/[\n\r]+/", " ", $ex->getMessage()),
[
'exception' => [
'class' => get_class($ex),
'file' => $ex->getFile(),
'line' => $ex->getLine(),
'code' => $ex->getCode(),
'trace' => $ex->getTraceAsString(),
'trace' => $ex->getTrace(),
]
]
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment