You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reopening issue #977, the suggested code to catch deserialization errors does not work.
post '/foo' => sub {
my $data = params('body') or die "couldn't deserialize " . request()->body;
};
there is no such params('body') on successful deserialization. also, no param('body').
i do not see a safe way to detect such failures at this time -- especially since parameters
get merged together from URL and content.
hence, it would be necessary to try to deserialize manually to see if it fails...
IMO still, the right fix is to return 400 or a 4xx (suggesting it should be 500 was, of course, a mistake).
The text was updated successfully, but these errors were encountered:
reopening issue #977, the suggested code to catch deserialization errors does not work.
there is no such
params('body')
on successful deserialization. also, noparam('body')
.i do not see a safe way to detect such failures at this time -- especially since parameters
get merged together from URL and content.
hence, it would be necessary to try to deserialize manually to see if it fails...
IMO still, the right fix is to return 400 or a 4xx (suggesting it should be 500 was, of course, a mistake).
The text was updated successfully, but these errors were encountered: