Create an error from multiple errors
94
Pending
Does it follow best practices?
Impact
94%
1.28xAverage score across 9 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses the aggregate-error package to aggregate validation errors and access them via the readonly errors getter. The focus is on proper instantiation of AggregateError and correct usage of the errors property to retrieve individual errors.",
"type": "weighted_checklist",
"checklist": [
{
"name": "AggregateError import",
"description": "Correctly imports or requires the aggregate-error package (e.g., const AggregateError = require('aggregate-error') or import AggregateError from 'aggregate-error')",
"max_score": 10
},
{
"name": "AggregateError instantiation",
"description": "Creates an AggregateError instance by calling new AggregateError() with an array of errors as the first argument",
"max_score": 25
},
{
"name": "Collects all errors",
"description": "Collects all validation errors into an array before passing them to AggregateError constructor, rather than throwing immediately on first error",
"max_score": 15
},
{
"name": "Uses errors getter",
"description": "Accesses the individual errors from the AggregateError instance using the .errors property (e.g., aggregateError.errors)",
"max_score": 30
},
{
"name": "Iterates over errors",
"description": "Iterates over the errors array returned by the .errors getter to extract error messages (e.g., using for...of, map, forEach, etc.)",
"max_score": 15
},
{
"name": "Throws AggregateError",
"description": "Throws the AggregateError instance when validation fails",
"max_score": 5
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9