Implement a handler for error returns.