def _maybe_raise_exception():
 assert ('OAUTH_ERROR_CODE' in os.environ)
 error = os.environ['OAUTH_ERROR_CODE']
 if error:
  assert ('OAUTH_ERROR_DETAIL' in os.environ)
  error_detail = os.environ['OAUTH_ERROR_DETAIL']
  if (error == str(user_service_pb.UserServiceError.NOT_ALLOWED)):
   raise NotAllowedError(error_detail)
  elif (error == str(user_service_pb.UserServiceError.OAUTH_INVALID_REQUEST)):
   raise InvalidOAuthParametersError(error_detail)
  elif (error == str(user_service_pb.UserServiceError.OAUTH_INVALID_TOKEN)):
   raise InvalidOAuthTokenError(error_detail)
  elif (error == str(user_service_pb.UserServiceError.OAUTH_ERROR)):
   raise OAuthServiceFailureError(error_detail)
  else:
   raise OAuthServiceFailureError(error_detail)

def _maybe_raise_exception ( ) : assert ( 'OAUTH_ERROR_CODE' in os . environ ) error = os . environ [ 'OAUTH_ERROR_CODE' ] if error : assert ( 'OAUTH_ERROR_DETAIL' in os . environ ) error_detail = os . environ [ 'OAUTH_ERROR_DETAIL' ] if ( error == str ( user_service_pb . UserServiceError . NOT_ALLOWED ) ) : raise NotAllowedError ( error_detail ) elif ( error == str ( user_service_pb . UserServiceError . OAUTH_INVALID_REQUEST ) ) : raise InvalidOAuthParametersError ( error_detail ) elif ( error == str ( user_service_pb . UserServiceError . OAUTH_INVALID_TOKEN ) ) : raise InvalidOAuthTokenError ( error_detail ) elif ( error == str ( user_service_pb . UserServiceError . OAUTH_ERROR ) ) : raise OAuthServiceFailureError ( error_detail ) else : raise OAuthServiceFailureError ( error_detail )
raises an error if one has been stored in os .