]> git.koha-community.org Git - koha.git/commit
Bug 37963: Case 1 - Return if sushi_errors even if response code >= 400
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Thu, 19 Sep 2024 13:39:07 +0000 (13:39 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 27 Sep 2024 16:00:34 +0000 (18:00 +0200)
commit5d53bb4bffa2cc1ee2bcc0a3d84fb74cc672fa97
tree414dcdc7f983338e8ad0a7ab4e34e0a1c15c5b5b
parent05381ba6b18d50fdc0329dd13a364cdb4e0eca11
Bug 37963: Case 1 - Return if sushi_errors even if response code >= 400

This ensures that SUSHI errors, if present, are shown on the UI even if
response->code >= 400.
This means that if, for example, SUSHI provider returns 401 with SUSHI
error like so:
{"Code": 2020, "Severity": "Error", "Message": "API Key Invalid"}

Then, the 'API Key Invalid' will be shown to the user, without having to
check logs.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/ERM/EUsage/UsageDataProvider.pm