Function: isUsageDeniedError()
isUsageDeniedError(
error):error is IDynaError & { data: IUsageDeniedErrorData }
Defined in: internal/usage-guard/UsageDeniedError.ts:69
isUsageDeniedError -- recognises the app's no on its way up
About
A
dynaErrorwhose code isUSAGE_DENIED_ERROR_CODE, and nothing else.
Narrows unknown to the error makeUsageDeniedError built, so a layer that catches everything can let this one through
untouched: the app decided, the gateway only passes the decision on.
Who needs it
Guardrails.runRule, to rethrow a refused judge call instead of turning it into a rule_error; the orchestration, to answer
FAILED with the issue usage_denied; a host around KbIngestor.ingestDocument, which throws the error itself (root barrel).
Parameters
error
unknown
Returns
error is IDynaError & { data: IUsageDeniedErrorData }