Error ReferenceDiagnostic Reference

Diagnostic Reference

ArchLex returns structured diagnostics with parse, analysis, and render results. Use each diagnostic’s code, severity, source span, and remediation to show a useful correction beside the diagram source.

const result = await archlex.render(source);
 
for (const diagnostic of result.diagnostics) {
  console.log(`${diagnostic.code}: ${diagnostic.message}`);
  console.log(`Fix: ${diagnostic.remediation}`);
}

Diagnostic Families

PrefixStageWhat to check
AL-PARSE-*ParserDirective syntax, resource declarations, relationship endpoints, and block delimiters
AL-STRUCT-*Structural analysisDuplicate IDs, missing references, invalid containment, and conflicting declarations
AWS-*AWS semanticsAWS resource names, scopes, containment, and provider relationships
GCP-*Google Cloud semanticsGoogle Cloud resource names, scopes, containment, and provider relationships
K8S-*Kubernetes semanticsKubernetes resource names, cluster and namespace placement, and workload relationships
CLOUDFLARE-*Cloudflare semanticsCloudflare resource placement at root or in a logical account

Icon warnings report unresolved or rejected icon assets. They do not change the provider semantic rules.

Severity

  • error identifies source that ArchLex cannot interpret or validate as a usable graph.
  • warning identifies a graph that ArchLex can render with a likely modeling problem.
  • info gives provider guidance without blocking output.

ArchLex can return a partial graph or SVG with diagnostics. Check the result instead of treating a rendered SVG as proof that the source has no errors.

Validation Modes

Set the mode with the validation directive or the matching API option:

validation normal
ModeBehavior
normalRuns the standard structural and provider checks
strictPromotes supported advisory findings to stricter diagnostics
offSkips provider semantic rules while retaining parsing and graph construction checks

Provider specifications describe the rules that each mode affects:

Fix a Diagnostic

  1. Find the diagnostic code and source span in the result.
  2. Read its remediation field.
  3. Open the code in the generated index when you need its full reference page.
  4. Update the source, then render it again.