Backend: Java
Frontend: Angular 5
Consider this:
The frontend makes an HTTP request to the backend.
The backend returns an HTTP Status code as response to the frontend's request.
For error-handling testing, I change the HTTP code, returned from the backend, manually.
Scenario 1:
On setting the code-to-be-returned to FORBIDDEN (407), the frontend correctly displayed the 407 error. Now, on setting back the code to OK (200), the frontend correctly reflected that as well.
Scenario 2:
On setting the code-to-be-returned to GONE (410), the frontend correctly displayed the 410 error. However, on setting back the code to OK (200), the frontend did not correctly reflect the change, but continued to show error 410.
In fact, even after stopping the server, the frontend did not show a net::ERR_CONNECTION_REFUSED
error, but continued to show the 410.
Any explanations?