All of my data sources are required to use HTTP Authentication. If the authentication is not correct (username and password don’t match) then I get HTTP 401 Transport error.
I want to catch this error in transformResponse() of the data source but it seems that by the time it is called, the error has already been generated.
My goal is to catch this error, display an alert and then modify the flow accordingly. Can anybody please help?
Ah, sorry, specifically for a 401 error there is no cross-browser way to suppress that dialog box. You instead need to know that login is required in advance, and submit credentials as part of the request.