There is 1 comment.
 
 
Cristal / cid:jira-generated-image-avatar-149323af-6163-48af-a61d-59721253fa95 CRISTAL-284 Open

No error message in case of failure during save page

 
View issue   ·   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-ee318696-dce8-4840-9a9a-8fed855d5bbc Marius Dumitru Florea on 04/Nov/24 15:28
 

Manuel Leduc the auto-save has code to indicate when the save fails and the content remains dirty, but the problem is that the storage component doesn't throw an exception when the save fails smile.png . The storage uses fetch to make the save HTTP request but doesn't check the response and fetch itself doesn't throw an exception. From https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

It returns a Promise that resolves to the Response to that request — as soon as the server responds with headers — even if the server response is an HTTP error status.

It's up to the code calling fetch to check the response and throw an exception if there is a problem (i.e. it's up to the code calling fetch to define what a failed request is).