← Về thư mục
openai4s/server/errors.py
- error_code_for · function · L43-L44 — def error_code_for(status: int) -> str
- GatewayError · class · L47-L57 — class GatewayError(Exception)
- init · method · L53-L57 — def init(self, code: int, message: str, error_code: str | None = None)
- expected_refusal · function · L60-L82 — def expected_refusal(error: BaseException) -> str | None
- log_turn_failure · function · L85-L97 — def log_turn_failure(error: BaseException, *, surface: str) -> None
- gateway_error_payload · function · L100-L110 — def gateway_error_payload(error: GatewayError) -> dict
- public_failure · function · L113-L148 — def public_failure(payload: object, status: int, request_id: str | None) -> object
- safe_type_name · function · L264-L289 — def safe_type_name(exc: BaseException) -> str
- safe_protocol_value · function · L292-L299 — def safe_protocol_value(value: Any, allowed: frozenset) -> str
- error_class · function · L302-L320 — def error_class(exc: BaseException) -> str
- _exact_id · function · L332-L334 — def _exact_id(value: Any) -> str
- record_diagnostic · function · L337-L373 — def record_diagnostic( exc: BaseException, *, surface: str, request_id: str | None = None ) -> dict
- public_exception · function · L376-L433 — def public_exception( exc: BaseException, *, surface: str, request_id: str | None = None, status: int = 500, error_code: str | None = None, ) -> tuple[dict, int]
- _enriched · function · L436-L446 — def _enriched(payload: dict, status: int, request_id: str) -> dict