Bug 39273

Summary: Search does not handle the diagnosis messages properly
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: Z39.50 / SRU / OpenSearch ServersAssignee: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: m.de.rooy, magnus
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39273: Ignore diagnostics messages received from BNF

Description Baptiste Wojtkowski (bwoj) 2025-03-07 15:15:24 UTC
Some requests to the BNF catalogue  like hereafter one return a <diagnosis> tag, which break Koha's parsing: https://catalogue.bnf.fr/api/SRU?version=1.2&operation=searchRetrieve&query=bib.title%20any%20%22les%20mis%C3%A9rables%22
Comment 1 Baptiste Wojtkowski (bwoj) 2025-03-07 15:32:57 UTC
Created attachment 179083 [details] [review]
Bug 39273: Ignore diagnostics messages received from BNF

TEST PLAN:
1 - Search on the BNF server (cf configuration hereafter) for title:
  "Les misérables" -> Notice the internal server error
2 - Apply patch
3 - Repeat the search -> Notice it works

The patch simply ignores the diagnosis messages. There is no need to
provide any feedback to the user.

Configuration fro BNF server:
Name : BNF-SRU-BIB
Address : catalogue.bnf.fr
Port : 80
Database : api/SRU
user : <empty>
password: <empty>
Comment 2 Magnus Enger 2025-03-19 12:53:14 UTC
Tried to recreate the error by following the test plan, but when I try to search I just get "Nothing found". No error. Could this have been fixed by another bug? Bug 37546 perhaps?
Comment 3 Magnus Enger 2025-04-01 13:49:59 UTC
Can't recreate the error.
Comment 4 Baptiste Wojtkowski (bwoj) 2025-06-02 12:12:15 UTC
Yes, this is very probably solved by related bug ! :)

Not really a duplicate, but marking so

*** This bug has been marked as a duplicate of bug 37546 ***