rreganjr / chichi-ng

component library for angular
MIT License
0 stars 0 forks source link

Add custom errors to hold extra data about the issue #47

Closed rreganjr closed 2 years ago

rreganjr commented 2 years ago

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#custom_error_types

custom errors with data to help build actionable resolutions, for example if there is a conflict you can give the user the option to shorten the new item so it doesn't conflict or shorten the existing item. having distinct error types with relevant data and not just a string facilitates this.