From b9d8e6be11dd6404c101ba328c45e141b2f9d37f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi 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 Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- 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 136e3134e6..2164b77901 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.39.5