You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, there are instances in the js codebase where errors are being handled in the success callback. We need to fix this so the error callback handles the errors. Right now what we're (probably) doing is just returning a jsonresponse(json). What we should be doing is assigning jsonresponse(json) to a variable and then changing the status_code of that variable to the error status code that you want and then that will make sure the error callback is being called. Simply returning the jsonresponse the way we were doing it always returns a 200 status code and ajax thinks everything went well so it calls the success callback.
The text was updated successfully, but these errors were encountered:
Right now, there are instances in the js codebase where errors are being handled in the success callback. We need to fix this so the error callback handles the errors. Right now what we're (probably) doing is just returning a jsonresponse(json). What we should be doing is assigning jsonresponse(json) to a variable and then changing the status_code of that variable to the error status code that you want and then that will make sure the error callback is being called. Simply returning the jsonresponse the way we were doing it always returns a 200 status code and ajax thinks everything went well so it calls the success callback.
The text was updated successfully, but these errors were encountered: