Skip to content

Conversation

@jonchurch
Copy link
Member

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 error object with createError.HttpError
properties. This will not alter the inheritance of the given
error object, and the modified error object is the
return value.

@jonchurch jonchurch added the tests label Mar 9, 2024
@carpasse
Copy link
Contributor

carpasse commented May 8, 2024

This change looks good to me.
@jonchurch CI should stop failing if you rebase your branch against master.

looking at this ci again, idk why it even passed under old node versions
that dont support const, seems sus
@jonchurch jonchurch merged commit a56fde9 into jshttp:master Feb 5, 2025
24 checks passed
@jonchurch jonchurch deleted the jonchurch/native-error-extension-test branch February 5, 2025 22:42
@UlisesGascon UlisesGascon mentioned this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants