From 513f6fd129a75f361797b43e8fb7cf23a1b09c7e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi <tomascohen@theke.io> Date: Mon, 6 Mar 2023 17:36:38 -0300 Subject: [PATCH] Bug 31793: (QA follow-up) DelAuthority doesn't return errors DelAuthority doesn't return an error, so the only possible error conditions are exceptions, that are unknown for now. Removing the error checking control structure and the 409 error returning, which is inherited from DelBiblio's call on the biblios endpoint. It will now just return a 500 in the event of an unhandled internal error. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> --- Koha/REST/V1/Authorities.pm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Koha/REST/V1/Authorities.pm b/Koha/REST/V1/Authorities.pm index 136e3134e67..2164b779014 100644 --- a/Koha/REST/V1/Authorities.pm +++ b/Koha/REST/V1/Authorities.pm @@ -119,17 +119,9 @@ sub delete { } return try { - my $error = DelAuthority( { authid => $authority->authid } ); + DelAuthority( { authid => $authority->authid } ); - if ($error) { - return $c->render( - status => 409, - openapi => { error => $error } - ); - } - else { - return $c->render( status => 204, openapi => "" ); - } + return $c->render( status => 204, openapi => q{} ); } catch { $c->unhandled_exception($_); -- 2.34.1