Create an error from multiple errors
94
Build a utility that collects and aggregates multiple errors from various sources, handling edge cases where errors may not have complete stack trace information.
Create a function that aggregates errors into a single error object. The function should:
@generates
/**
* Aggregates multiple errors into a single error object.
*
* @param {Array<Error|object|string>} errors - Array of errors to aggregate
* @returns {Error} An aggregated error containing all input errors
*/
function aggregateErrors(errors) {
// IMPLEMENTATION HERE
}
module.exports = { aggregateErrors };Provides error aggregation functionality with robust edge case handling.
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