Error handling on request handler