[Koha-bugs] [Bug 35199] New: Fix error handling in http-client.js

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 31 14:55:03 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35199

            Bug ID: 35199
           Summary: Fix error handling in http-client.js
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: major
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: jonathan.druart+koha at gmail.com
          Reporter: jonathan.druart+koha at gmail.com
        QA Contact: testopia at bugs.koha-community.org
        Depends on: 34448

Coming from bug 34448.

386         // Submit the form, get 500
387         cy.intercept("POST", "/api/v1/erm/agreements", {
388             statusCode: 500,
389             error: "Something went wrong",
390         });
391         cy.get("#agreements_add").contains("Submit").click();
392         cy.get("main div[class='dialog alert']").contains(
393             "Something went wrong: SyntaxError: Unexpected end of JSON
input"
394         );

This is totally wrong. We are now showing a JS error instead of the expected
500: internal server error!


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34448
[Bug 34448] ERM should be able to display error messages coming from the API
-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list