HTTP 401 Transport Error in DataSource.fetchData()

I use SmartClient 8.1.

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?

There’s a separate RPCManager handler for handleTransportError.

I added the call to isc.RPCManager.handleTransportError() in my code. but still I get the http authentication window before the alert() call in the handleTransportError() function.

Again, my goal is to handle the http authentication error before the browser generates any other message/dialog.

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.