Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

quality.error-handling

Keep error payload shape consistent

Inconsistent thrown or rejected error shapes make error handling brittle.

#Metadata

Rule ID
ts.quality.no-inconsistent-error-shape
Severity
medium
Confidence
0.82
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
block
Tags
error-handling, quality, rules-catalog

#Why it matters

Standardized error construction simplifies observability, retries, and user-safe handling.

#Remediation

Standardize on one error type or envelope and normalize throw/reject paths.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.quality.no-inconsistent-error-shape.rule.yaml.