AggragateError

const error = new AggregateError([
new Error('ERROR_11112'),
new TypeError('First name must be a string'),
new RangeError('Transaction value must be at least 1'),
new URIError('User profile link must be https'),
], 'Transaction cannot be processed')
error instanceof AggregateError // true
error.name // 'AggregateError'
error.message // 'Transaction cannot be processed'
error.errors // The array of errors

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Top 3 JS Game Development Libraries

The inspect tool — tips and tricks #2

The Fetch/XHR option checked in the network tab in the inspect tool in google chrome

Inspector or editor?

A Beautiful Parallax Scrolling Effect in VueJS — Daily Vue Tips #2

Do we need a React framework?

React Key Prop

No more NextJS blackbox. View debug info with VS Code JS Debugger

An introduction to RxJS: things you need to know in 2021

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jeffery R Eckert

Jeffery R Eckert

More from Medium

An Interview with Margaret Lee

How to resolve unidentified network in windows 10: Solutions that work

The TDD Experience

CS373 Spring 2022: Week 7