Skip to main content

Error Codes Reference

Complete reference of all AXAG error codes used in validation, runtime enforcement, and agent communication.

Validation Error Codes​

These are emitted by axag-lint and by axag validate. Severities are the defaults; a project can change any of them in .axaglintrc.json.

CodeDefault severityDescription
AXAG-LINT-001ErrorInteractive element missing axag-intent attribute
AXAG-LINT-002ErrorElement has axag-intent but missing axag-entity
AXAG-LINT-003ErrorElement has axag-intent but missing axag-action-type
AXAG-LINT-004ErrorInvalid axag-action-type value
AXAG-LINT-005ErrorInvalid axag-risk-level value
AXAG-LINT-006WarningHigh/critical risk without confirmation-required
AXAG-LINT-007WarningWrite/delete action without idempotent declaration
AXAG-LINT-008ErrorParameter name appears in both required and optional parameters
AXAG-LINT-009ErrorInvalid JSON in parameter attributes
AXAG-LINT-010WarningIntent not found in manifest
AXAG-LINT-011WarningRole-based attributes without scope declaration
AXAG-LINT-012ErrorApproval required without approval roles
AXAG-LINT-013ErrorRead action with critical risk level
AXAG-LINT-014WarningWrite action with contradictory precondition
AXAG-LINT-015WarningNavigate action with side effects
AXAG-LINT-016WarningTenant-specific role name with non-tenant scope
AXAG-LINT-017WarningNon-idempotent mutation without side effects declaration
AXAG-LINT-018WarningGlobal scope with personal entity
AXAG-LINT-019WarningSuperadmin role with tenant scope
AXAG-LINT-020WarningSame entity with different scopes in the same file
AXAG-LINT-021WarningDelete action without scope declaration
AXAG-LINT-022WarningWrite action with user scope but tenant-level entity
AXAG-LINT-023ErrorWrite/delete action without risk-level
AXAG-LINT-024WarningDelete action with risk-level below high
AXAG-LINT-025InfoRead action with risk-level above low
AXAG-LINT-026WarningSafety metadata mismatch for declared risk level
AXAG-LINT-027ErrorInvalid axag macro syntax
AXAG-LINT-028Erroraxag macro conflicts with a longhand attribute
AXAG-LINT-029WarningForm control has no name and cannot become a parameter
AXAG-LINT-030WarningForm constraint disagrees with the linked schema
AXAG-LINT-031ErrorAnnotated element has no accessible name
AXAG-LINT-032WarningHarvested parameter has no label or description
AXAG-LINT-033InfoDynamic axag value is registered at runtime only
AXAG-LINT-034Erroraxag-intent does not match entity.verb
AXAG-LINT-035Erroraxag-entity is not a lowercase name
AXAG-LINT-036ErrorTenant-scoped action exposes a tenant identifier as a parameter
AXAG-LINT-037WarningHigh-risk action has no server-side enforcement

Runtime Error Codes​

These are returned when a call breaks the contract. The codes are exported from @web-axag/core as AXAG_ERRORS, with AxagError and refusal() to raise them, so a refusal means the same thing wherever it comes from.

Raised by says which part of the SDK produces a code today: server is the @web-axag/server enforcer, runtime is the in-page enforcers in @web-axag/webmcp. Parameter checks against inputSchema are normally done by the agent host before a tool is called; a handler or API that validates again — as it should — reports failures with the codes marked your code.

CodeCategoryHTTP StatusDescriptionRaised by
AXAG_MISSING_PARAMParameter400Required parameter not providedyour code
AXAG_INVALID_TYPEParameter400Parameter value has wrong typeyour code
AXAG_OUT_OF_RANGEConstraint400Numeric value or string length outside min/max boundsyour code
AXAG_INVALID_ENUMConstraint400Value not in allowed enum setyour code
AXAG_INVALID_FORMATConstraint400Value doesn't match declared format or patternyour code
AXAG_PRECONDITION_FAILEDPrecondition412Precondition check failedyour code
AXAG_CONFIRMATION_MISSINGSafety428Confirmation required but no valid token providedserver, runtime
AXAG_APPROVAL_MISSINGSafety428Approval required but not providedserver
AXAG_APPROVAL_INVALIDSafety403Approval from unauthorized roleyour code
AXAG_SCOPE_VIOLATIONSecurity403Operation outside declared scopeserver (CSRF)
AXAG_TENANT_BOUNDARYSecurity403Cross-tenant access attemptserver, runtime
AXAG_ROLE_INSUFFICIENTAuthorization403Caller lacks required roleserver
AXAG_INTENT_NOT_FOUNDRouting404Requested intent not in manifestserver

Reserved for Future Use​

These codes are reserved so implementations don't invent conflicting names, but no AXAG tooling raises them yet. A server that needs them today should return them in the same shape.

CodeCategoryHTTP StatusDescription
AXAG_VERSION_MISMATCHCompatibility409Consumer/manifest version incompatible
AXAG_RATE_LIMITEDThrottling429Too many requests for this intent

Error Response Format​

A refusal is a flat object. error is the code and status its HTTP status, so a server can answer with it directly; intent and details are present when there is something to say.

{
"error": "AXAG_PRECONDITION_FAILED",
"status": 412,
"message": "Precondition not met: cart must have at least one item",
"intent": "cart.begin_checkout",
"details": {
"failed_precondition": "cart must have at least one item"
}
}
{
"error": "AXAG_APPROVAL_MISSING",
"status": 428,
"message": "\"user.deactivate\" has no approval yet",
"intent": "user.deactivate",
"details": { "approval_roles": ["security_admin"] }
}

In code, AxagError carries the same fields and toRefusal() produces this object. See Runtime Validation.

Agent Handling Guide​

Error CodeAgent Action
AXAG_MISSING_PARAMAdd the missing parameter and retry
AXAG_INVALID_TYPEFix the parameter type and retry
AXAG_OUT_OF_RANGEAdjust value to within bounds and retry
AXAG_INVALID_ENUMChoose a value from the tool's enum and retry
AXAG_INVALID_FORMATReformat the value and retry
AXAG_PRECONDITION_FAILEDExecute prerequisite action, then retry
AXAG_CONFIRMATION_MISSINGAsk the person to confirm, then retry with the confirmation token
AXAG_APPROVAL_MISSINGRequest approval from an authorized role, then retry
AXAG_APPROVAL_INVALIDDo not retry with the same approver
AXAG_ROLE_INSUFFICIENTDo not retry — escalate to a person with the role
AXAG_SCOPE_VIOLATIONDo not retry — operation is out of scope
AXAG_TENANT_BOUNDARYDo not retry — security violation
AXAG_INTENT_NOT_FOUNDRefresh the tool list; the action may no longer be on the page