Bugzilla – Attachment 149435 Details for
Bug 33482
Errors from EBSCO's ws are not reported to the UI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33482: Propagate errors from EBSCO's ws to the UI
Bug-33482-Propagate-errors-from-EBSCOs-ws-to-the-U.patch (text/plain), 2.05 KB, created by
Jonathan Druart
on 2023-04-11 11:49:28 UTC
(
hide
)
Description:
Bug 33482: Propagate errors from EBSCO's ws to the UI
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-04-11 11:49:28 UTC
Size:
2.05 KB
patch
obsolete
>From 8f05465f1708568dab010bff98edee6a615de727 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 11 Apr 2023 13:46:51 +0200 >Subject: [PATCH] Bug 33482: Propagate errors from EBSCO's ws to the UI > >When adding or removing eholdings from EBSCO, if an error happens it is >lost and not propagated to the UI. > >We were missing a return in the logic, and always returning 200 > >Test plan: >Do not apply (or revert) bug 33481 >Configure EBSCO for ERM and add a package to your holdings >With this patch applied you will get a 500 that is propagated to the UI >Without this patch nothing happens and the user is not aware that >something bad happened >--- > Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm b/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm >index ccdad769222..8c65c087064 100644 >--- a/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm >+++ b/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm >@@ -116,7 +116,7 @@ sub get { > ); > } > catch { >- $c->unhandled_exception($_); >+ return $c->unhandled_exception($_); > }; > } > >@@ -138,6 +138,11 @@ sub edit { > isSelected => $is_selected, > } > ); >+ >+ return $c->render( >+ status => 200, >+ openapi => { is_selected => $is_selected } # We don't want to refetch the resource to make sure it has been updated >+ ); > } > catch { > if ( blessed $_ ) { >@@ -150,16 +155,11 @@ sub edit { > } > } > >- $c->unhandled_exception($_); >+ return $c->unhandled_exception($_); > }; >- >- return $c->render( >- status => 200, >- openapi => { is_selected => $is_selected } # We don't want to refetch the resource to make sure it has been updated >- ); > } > catch { >- $c->unhandled_exception($_); >+ return $c->unhandled_exception($_); > }; > } > >-- >2.25.1
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 33482
:
149435
|
149439
|
149440
|
149450
|
149508
|
150292