Hi,

Is this a good solution to the problem of missing HTTP error handling in JavaScript?


http://gist.github.com/331301

Summary:
Send the request with suppress_response_codes enabled, if the response indicates an authentication error, send it again without suppress_response_codes (making the browser's authentication dialog pop up), if it's some other error, display the error, otherwise, call the callback function.

(Yes, I know, I should switch to OAuth quite soon)

Niklas

Reply via email to