qfa.domain.errors#
Domain error hierarchy for the feedback analysis backend.
Exceptions
Non-recoverable error during feedback analysis. |
|
Raised when an analysis exceeds the allowed deadline. |
|
Raised when an API request cannot be authenticated. |
|
Raised when a user lacks permission for the requested operation. |
|
Base error for all domain-level exceptions. |
|
|
Raised when estimated tokens for the submitted feedback exceed the limit. |
Base error for LLM adapter failures. |
|
Raised when the LLM provider returns a rate-limit response. |
|
Raised when the LLM provider does not respond in time. |
|
Raised when an LLM call is recorded without an active CallContext. |
|
Raised when a usage-repository read fails due to backend unavailability. |
- exception qfa.domain.errors.DomainError[source]#
Bases:
ExceptionBase error for all domain-level exceptions.
- exception qfa.domain.errors.AnalysisError[source]#
Bases:
DomainErrorNon-recoverable error during feedback analysis.
- exception qfa.domain.errors.AnalysisTimeoutError[source]#
Bases:
AnalysisErrorRaised when an analysis exceeds the allowed deadline.
- exception qfa.domain.errors.FeedbackTooLargeError(message: str, *, estimated_tokens: int, limit: int)[source]#
Bases:
AnalysisErrorRaised when estimated tokens for the submitted feedback exceed the limit.
- exception qfa.domain.errors.LLMError[source]#
Bases:
DomainErrorBase error for LLM adapter failures.
- exception qfa.domain.errors.LLMTimeoutError[source]#
Bases:
LLMErrorRaised when the LLM provider does not respond in time.
- exception qfa.domain.errors.LLMRateLimitError[source]#
Bases:
LLMErrorRaised when the LLM provider returns a rate-limit response.
- exception qfa.domain.errors.AuthenticationError[source]#
Bases:
DomainErrorRaised when an API request cannot be authenticated.
- exception qfa.domain.errors.AuthorizationError[source]#
Bases:
DomainErrorRaised when a user lacks permission for the requested operation.
- exception qfa.domain.errors.MissingCallScopeError[source]#
Bases:
RuntimeErrorRaised when an LLM call is recorded without an active CallContext.
Indicates a wiring bug: the orchestrator forgot to enter a
call_scopeblock before calling the LLM. Should never reach a user.
Bases:
DomainErrorRaised when a usage-repository read fails due to backend unavailability.
Distinct from “feature disabled”: this signals that the repository is wired and the request hit the DB but the connection or query failed transiently (e.g. Postgres unreachable, pool exhausted, broker reset). The API surfaces this as
503 {"code": "usage_backend_unavailable"}, so consumers can distinguish it fromusage_tracking_disabledand drive retry/backoff logic accordingly.