Bugzilla – Attachment 150292 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.17 KB, created by
Martin Renvoize (ashimema)
on 2023-04-27 12:13:35 UTC
(
hide
)
Description:
Bug 33482: Propagate errors from EBSCO's ws to the UI
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-04-27 12:13:35 UTC
Size:
2.17 KB
patch
obsolete
>From e23395fe6df44d13cea5b52d3f99c1077ea10f15 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 > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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 ccdad76922..8c65c08706 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.40.0
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