We need to return the error status to the browser if an error occurred.