File tree 1 file changed +3
-3
lines changed
Filter options
1 file changed +3
-3
lines changed
Original file line number Diff line number Diff line change @@ -236,15 +236,15 @@ response:
236
236
237
237
If you want to overwrite the status code of the exception response, which
238
238
you should not without a good reason, call
239
- ``GetResponseForExceptionEvent::allowSuccessfulResponse () `` first and then
239
+ ``GetResponseForExceptionEvent::allowCustomResponseCode () `` first and then
240
240
set the status code on the response::
241
241
242
- $event->allowSuccessfulResponse ();
242
+ $event->allowCustomResponseCode ();
243
243
$response = new Response('No Content', 204);
244
244
$event->setResponse($response);
245
245
246
246
The status code sent to the client in the above example will be ``204 ``. If
247
- ``$event->allowSuccessfulResponse () `` is omitted, then the kernel will set
247
+ ``$event->allowCustomResponseCode () `` is omitted, then the kernel will set
248
248
an appropriate status code based on the type of exception thrown.
249
249
250
250
.. seealso ::
You can’t perform that action at this time.
0 commit comments