Details
-
Story
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
None
-
-
Prokopovych - Sprint 115, Prokopovych - Sprint 116, Prokopovych - Sprint 117
-
3
-
Prokopovych
Description
When a back-end save request fails with an error HTTP status code like 500, 400, 409, ... the front-end should open an error popup showing the HTTP status code and the HTTP status message.
How to reproduce with tamper dev:
Use Chrome
Install https://tamper.dev/
Open "Semantic web primer" for editing: https://folio-snapshot.dev.folio.org/inventory/edit/5bf370e0-8cca-4d9c-82e4-5170ab2a0a39/instance?query=%2A&sort=title
Change a character in the title.
Press Alt+T to open tamper dev and enable "Intercept requests".
On "Semantic web primer" press "Save and close".
In tamper dev send the OPTIONS request unchanged,
and for the PUT request change the HTTP status code from 204 to 500.
Actual result: Nothing happens, the edit form stays open without any error message.
Expected result: Error popup showing HTTP status code and HTTP status message.
The same when saving holdings or item.
How to reproduce with nginx:
Use this Vagrant file:
Vagrant.configure("2") do |config| config.vm.box = "folio/snapshot-core" config.vm.network "forwarded_port", guest: 9130, host: 9130, disabled: true config.vm.network "forwarded_port", guest: 9130, host: 9129 end
Run nginx in front of Vagrant with this configuration:
server { listen 9130; client_max_body_size 200m; location / { proxy_pass http://127.0.0.1:9129; proxy_redirect default; } # A semantic web primer location /inventory/instances/5bf370e0-8cca-4d9c-82e4-5170ab2a0a39 { if ($request_method = PUT) { add_header 'Access-Control-Allow-Origin' '*' always; return 409 'Optimistic Locking Conflict'; } proxy_pass http://127.0.0.1:9129/inventory/instances/5bf370e0-8cca-4d9c-82e4-5170ab2a0a39; proxy_redirect default; } }
Open "A semantic web primer" for editing: http://localhost:3000/inventory/edit/5bf370e0-8cca-4d9c-82e4-5170ab2a0a39/instance
Change a character in the title.
Press "Save and close".
Actual result: Nothing happens, the edit form stays open without any error message.
Expected result: Error popup showing "409 Optimistic Locking Conflict".
The same when saving holdings or item.
TestRail: Results
Attachments
Issue Links
- relates to
-
UIU-2529 Error popup on HTTP error status code (500, 400, 409, ...)
-
- Open
-
-
UIIN-1245 Implement optimistic locking in Inventory
-
- Closed
-
-
UIIN-1568 align dependency versions affected by Inventory's Optimistic Locking
-
- Closed
-
-
UXPROD-3089 Inventory. Implementing Optimistic Locking
-
- Closed
-
-
UXPROD-3173 Folijet support work for Inventory Optimistic Locking (Data Import and SRS)
-
- Closed
-