@@ -, +, @@ exceptions --- Koha/REST/V1/Checkouts.pm | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) --- a/Koha/REST/V1/Checkouts.pm +++ a/Koha/REST/V1/Checkouts.pm @@ -227,23 +227,14 @@ sub update { my $params = $c->req->json; $checkout->set_from_api( $params ); $checkout->store(); + $checkout->discard_changes; return $c->render( status => 200, openapi => $checkout->to_api ); } catch { - unless ( blessed $_ && $_->can('rethrow') ) { - return $c->render( - status => 500, - openapi => { error => "Something went wrong, check Koha logs for details." } - ); - } - - return $c->render( - status => 500, - openapi => { error => "$_" } - ); + $c->unhandled_exception($_); }; } --