Fixes query in request method so that it works with the error handler
method.