Interface: IIssue
Defined in: contracts/types.ts:579
Common result of any check: a guardrail rule, the usage adapter's denial, the context assembler's warnings.
Produced by the Guardrails, by makeUsageDeniedIssue and by the ContextAssembler; delivered in
IAnswerResponse.issues (the warnings of a delivered answer) and IFailedResponse.issues (what failed the call), and
recorded on the trace entry of the call.
Properties
code
code:
string
Defined in: contracts/types.ts:583
Machine code, e.g. "sum_mismatch".
data?
optionaldata?:Record<string,unknown>
Defined in: contracts/types.ts:607
Machine-readable details of the issue, when it has some.
Example
{denyCode: "plan_exhausted"} - the `denyCode` the usage adapter answered a `usage_denied` with
field?
optionalfield?:string
Defined in: contracts/types.ts:593
Field path when the issue concerns one field.
message
message:
string
Defined in: contracts/types.ts:589
Dev/Tech message: what happened, in English, ids in brackets, for the server log and the developer.
Never shown to the end user;
userMessageis the text for them.
ruleName?
optionalruleName?:string
Defined in: contracts/types.ts:581
The Guardrails rule that reported it; stamped by the Guardrails, also on rule_error. Absent on other issues (usage, assembler).
severity
severity:
EIssueSeverity
Defined in: contracts/types.ts:591
How bad it is: an ERROR fails the call or blocks the answer, a WARNING is delivered with the answer.
userMessage?
optionaluserMessage?:string
Defined in: contracts/types.ts:601
Text for the end user, when the issue has one.
The application's own words, already in the user's language.
Set on usage_denied from the usage adapter's denyUserMessage; a host shows it as it is and never shows message.