As per discussion in https://github.com/mojolicious/mojo/issues/1622, one
can use something like
$c->reply->exception('Division by zero!')->rendered(400)
On Friday, November 27, 2020 at 8:54:33 AM UTC Robert Rothenberg wrote:
> I should be more specific. In a "before_render" method, overriding
> "status" in the arguments hash or in the stash does not actually change the
> status. I'd like to be able to change the status from 500 to something
> else.
>
> On Thursday, November 26, 2020 at 9:12:51 AM UTC Robert Rothenberg wrote:
>
>> That's helpful for customising the error pages. But how do I update the
>> HTTP status code?
>>
>>
>> On Wednesday, November 25, 2020 at 4:51:48 PM UTC Sebastian Riedel wrote:
>>
>>> Likewise, is a plugin or documented method for overriding the
>>>> `reply.exception` helper to use a specific template/layout when there are
>>>> errors?
>>>>
>>>
>>>
>>> https://docs.mojolicious.org/Mojolicious/Guides/Rendering#Rendering-exception-and-not_found-pages
>>>
>>> --
>>> sebastian
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mojolicious/b42e4d23-e49e-47da-bde5-d336e6b67eafn%40googlegroups.com.