Handle failed file download
Expected Behavior
When a user who is teacher and has a submitted grades document, at grades document download if the api does not return a valid response (e.g. when the user session is expired), the user should see a modal with the error.
Actual Behavior
When a user who is teacher and has a submitted grades document, at grades document download if the api does not return a valid response (e.g. when the user session is expired), a file that contains the error is downloaded.
Steps to Reproduce
Using a user who is teacher and can download documents (grades or class student listing),
- open a tab with the teachers app at the screen that downloads the documents
- wait until the user session expires or end it by hand (e.g. logout at a different tab if the universis installation invalidates loged out tokens)
- Download a file.
- Verify that the file download contains the error message
More Information (optional)
Edited by Dimitrios Pliakos