Handle the error parameter of the request callback