Create an error from multiple errors
94
{
"context": "This criteria evaluates how well the engineer uses the aggregate-error package to handle edge cases with missing, empty, or deleted stack traces in errors. The focus is on correct usage of the AggregateError constructor and the errors property.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Imports AggregateError",
"description": "Uses the aggregate-error package by importing or requiring it (e.g., 'import AggregateError from \"aggregate-error\"' or 'const AggregateError = require(\"aggregate-error\")')",
"max_score": 20
},
{
"name": "Creates AggregateError instance",
"description": "Uses the AggregateError constructor to create an aggregated error from the input array (e.g., 'new AggregateError(errors)')",
"max_score": 30
},
{
"name": "Returns AggregateError",
"description": "Returns the AggregateError instance from the aggregateErrors function",
"max_score": 15
},
{
"name": "Handles missing stacks",
"description": "The implementation correctly handles errors without a stack property by relying on AggregateError's built-in edge case handling (errors are converted to strings when stack is missing)",
"max_score": 15
},
{
"name": "Handles empty stacks",
"description": "The implementation correctly handles errors with empty string stacks by relying on AggregateError's built-in edge case handling",
"max_score": 10
},
{
"name": "Provides error access",
"description": "The returned AggregateError allows access to individual errors through its errors property, enabling iteration over aggregated errors",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-aggregate-errordocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9