Skip to content

Authress-Engineering/error-object-polyfill.js

Repository files navigation

error-object-polyfill.js

Replace your lame string errors with object versions.

Usage

Use Error.create to pass objects as error messages. That's it, really simple, one line error objects, go to town!

throw Error.create({ title: 'Message', details: { data: {} } }, 'OPTIONAL_ERROR_CODE');

About

Replace your lame string errors with object versions

Resources

License

Stars

Watchers

Forks

Packages

No packages published