Common utilities for error handling within Backstage with structured error classes and serialization functions
63
{
"context": "Evaluates whether the solution builds the spec's error module by leaning on @backstage/errors for cause-aware error handling. Checks focus on inheriting the package's base class and using its helpers to preserve causes, messages, and names when wrapping unknown failures.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Base inheritance",
"description": "PipelineError extends @backstage/errors CustomErrorBase instead of the built-in Error, so cause-aware messaging and captured stacks come from the package.",
"max_score": 30
},
{
"name": "Cause retention",
"description": "Constructor forwards the optional cause through CustomErrorBase so Error inputs surface as the instance's cause while non-Error values are dropped per isError checks.",
"max_score": 20
},
{
"name": "Message chaining",
"description": "Messages rely on CustomErrorBase/stringifyError behavior to append the cause text to the primary message rather than reimplementing concatenation logic.",
"max_score": 15
},
{
"name": "Subclass naming",
"description": "InvalidConfigError and TaskFailedError depend on CustomErrorBase to auto-assign the subclass name (no manual name strings or overrides).",
"max_score": 15
},
{
"name": "Guard helpers",
"description": "ensureError uses assertError or isError from @backstage/errors to accept existing Error instances and wrap unknown values with a fallback message instead of ad-hoc type guards.",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-backstage--errorsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10