handle requests errors