Bugzilla – Attachment 147832 Details for
Bug 31793
Add DELETE endpoint for Authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31793: (QA follow-up) DelAuthority doesn't return errors
Bug-31793-QA-follow-up-DelAuthority-doesnt-return-.patch (text/plain), 1.54 KB, created by
Marcel de Rooy
on 2023-03-07 12:45:16 UTC
(
hide
)
Description:
Bug 31793: (QA follow-up) DelAuthority doesn't return errors
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-03-07 12:45:16 UTC
Size:
1.54 KB
patch
obsolete
>From f0ff4ecad302d839162e0eb65c7244636d276f75 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 >Content-Type: text/plain; charset=utf-8 > >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> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31793
:
144472
|
144705
|
147808
|
147809
|
147810
|
147831
| 147832 |
147833