http-errors
http-errors copied to clipboard
Add test for extending native errors w/o altering prototype
This adds a test to assert on behavior outlined in the docs but not captured in the test suite.
https://github.com/jshttp/http-errors?tab=readme-ov-file#createerrorstatus-error-properties
createError([status], [error], [properties])
Extend the given
errorobject withcreateError.HttpErrorproperties. This will not alter the inheritance of the givenerrorobject, and the modifiederrorobject is the return value.
This change looks good to me. @jonchurch CI should stop failing if you rebase your branch against master.