Redirect user to an error page

The user should be redirected to an error page when the api throws an error