Skip to content

Commit 38b2b44

Browse files
authored
Merge pull request #2250 from lgv5/rendering-guide-fix
Changing the status code of an exception isn't possible
2 parents accef4e + 484e27f commit 38b2b44

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/Mojolicious/Guides/Rendering.pod

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,7 @@ L<Mojolicious::Plugin::DefaultHelpers/"reply-E<gt>not_found">.
518518

519519
app->start;
520520

521-
To change the HTTP status code of the exception, you can use L<Mojolicious::Controller/"rendered">.
522-
523-
return $c->reply->exception('Division by zero!')->rendered(400) if $divisor == 0;
524-
525-
You can also change the templates of those pages, since you most likely want to show your users something more closely
521+
You can change the templates of those pages, since you most likely want to show your users something more closely
526522
related to your application in production. The renderer will always try to find C<exception.$mode.$format.*> or
527523
C<not_found.$mode.$format.*> before falling back to the built-in default templates.
528524

0 commit comments

Comments
 (0)