Add error response handler