Errors in response to UI calls

Description

When UI make a call to another module and the other module is down or is not able the process the request, UI should provide details to the user so that a better information can be provided if for troubleshooting.

Scenario 1

Given Bulk edit forms

When ui-bulk-edit makes a call to another module and the module is not able to process the request

Then the error message contains: “<module-name> returns status code: <status-code> - <error details>. “

The <module-name> is the name of the FOLIO module as used in http calls. If the response from the failing module does not contain the details then the <error details> should contain the standard error statuses for http calls: , for example “mod-users returns status code: 503 - Service Unavailable.”

 

Examples of calls to non bulk-operation module:

  • /entity-types/:id Get entity types (mod-fqm-manager)

  • /publications - Get different entities based on tenant (locations, notes) (mod-consortia)

  • /perms/permissions - Get all permissions (mod-permissions)

  • /holdings-note-types - Holdings Note types (mod-inventory-storage)

  • /instance-note-types - Instance Note types (mod-inventory-storage)

  • /item-note-types - Item Note types (mod-inventory-storage)

  • /loan-types - Loan types (mod-inventory-storage)

  • /groups - Get all user groups (mod-users)

Environment

None

Potential Workaround

None

Attachments

3

Checklist

hide

Activity

Show:

Tatsiana Hryhoryeva January 14, 2025 at 6:00 AM

While checking another ticket the error is noticed on https://folio-testing-sprint-cs00000int.ci.folio.org/ environment

Magda Zacharska January 13, 2025 at 7:10 PM

Verified by reviewing screenshots provided by Vadym. Works as expected

Vadym Shchekotilin January 6, 2025 at 8:05 PM

Dev tested on consortium rancher via disabling some inventory and consortia modules:

Vadym Shchekotilin December 19, 2024 at 2:21 PM

Hi , I would like to add some additional context here.
There is a list of hardcoded ERROR_STATUSES as per now

Most popular as per me:

Also module names which were harcoded:


Mikita proposed check library, which also contains most popular codes, and we can avoid hardcoding them on our side, but will have +1 dependency.

cc

John Coburn December 18, 2024 at 11:42 PM

While yes, the messages are different from one another in their meaning, there’s nothing that a user can do to affect a ‘bad request’ is there? - and to a developer “418” is just as good as saying “418: I’m a teapot” (yes, that is the actual HTTP error message!) I’m all for pruning that list if that’s really the best we can provide in this scenario - but seeing some of the screenshots around this bug and varying levels of detail for the error message - from the users’s perspective - what happens next in the workflow when such errors are encountered? Is there a retry mechanism for failed records? When it comes to the implementation details in the applicable PR, holding static lists of data that get very little usage - and other static lists of data (backend modules connected to the platform) that are technically unknown/out of scope to this module, it begs the question if there is any other information that Bulk Edit itself holds and can easily present that might be more useful in helping the user to work around the error and move forward. This seems like it would be applicable even when the backend does return an error message and the UI isn’t having to account for the shortcoming of the backend.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Fix versions

Release

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created October 23, 2024 at 5:11 PM
Updated March 13, 2025 at 8:24 AM
Resolved January 13, 2025 at 7:10 PM
TestRail: Cases
TestRail: Runs