File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,9 @@ protected function getExceptionMessage($exception)
173173 $ exceptionMap = $ this ->container ->getParameter ('fos_rest.exception.messages ' );
174174 $ showExceptionMessage = $ this ->isSubclassOf ($ exception , $ exceptionMap );
175175
176- return $ showExceptionMessage || $ this ->container ->get ('kernel ' )->isDebug () ? $ exception ->getMessage () : '' ;
176+ return $ showExceptionMessage || $ this ->container ->get ('kernel ' )->isDebug ()
177+ ? $ exception ->getMessage ()
178+ : Response::$ statusTexts [$ this ->getStatusCode ($ exception )];
177179 }
178180
179181 /**
@@ -186,7 +188,7 @@ protected function getExceptionMessage($exception)
186188 protected function getStatusCode ($ exception )
187189 {
188190 $ exceptionMap = $ this ->container ->getParameter ('fos_rest.exception.codes ' );
189- $ isExceptionMappedToStatusCode = $ this ->isSubclassOf ($ exception , $ exceptionMap );;
191+ $ isExceptionMappedToStatusCode = $ this ->isSubclassOf ($ exception , $ exceptionMap );
190192
191193 return ($ isExceptionMappedToStatusCode ) ? $ isExceptionMappedToStatusCode : $ exception ->getStatusCode ();
192194 }
You can’t perform that action at this time.
0 commit comments