check for both 'message' and 'error_message' in error response