MCPcopy Create free account
hub / github.com/23japhone/HALO / AccessTerminatedException

Class AccessTerminatedException

utils/basic_operation.py:76–89  ·  view source on GitHub ↗

Raised when the key has been terminated

Source from the content-addressed store, hash-verified

74
75# api key with no permission
76class AccessTerminatedException(Exception):
77 "Raised when the key has been terminated"
78 def __init__(self,
79 key: str,
80 cause: Optional[str] = None) -> None:
81 super().__init__(f"Access terminated key: {key}")
82 self.key = key
83 self.cause = cause
84
85 def __str__(self) -> str:
86 if self.cause:
87 return f"{super().__str__()}. Caused by {self.cause}"
88 else:
89 return super().__str__()
90
91
92def track_usage(res_json: dict) -> dict:

Callers 1

inference_chatFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected