Explorar el Código

moving to 500 error

Tim Millwood hace 10 años
padre
commit
8ffa4ae640
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Packagist/WebBundle/Controller/ApiController.php

+ 1 - 1
src/Packagist/WebBundle/Controller/ApiController.php

@@ -83,7 +83,7 @@ class ApiController extends Controller
             $em->flush();
         } catch (\Exception $e) {
             $this->get('logger')->crit($e->getMessage(), array('exception', $e));
-            return new JsonResponse(array('status' => 'error', 'message' => $e->getMessage()), 406); 
+            return new JsonResponse(array('status' => 'error', 'message' => 'Error saving package'), 500); 
         }
 
         return new JsonResponse(array('status' => 'success'), 202);