The documentation for Dancer2::Core::Error includes instantiating a new object and then using the render method (which doesn't exist anymore) and then setting it as the response using Dancer2::Core::Response's set, which doesn't exist.
Instead, we just create a new instance and call throw.
The documentation for
Dancer2::Core::Error
includes instantiating a new object and then using therender
method (which doesn't exist anymore) and then setting it as the response usingDancer2::Core::Response
'sset
, which doesn't exist.Instead, we just create a new instance and call
throw
.