Skip to content

Conversation

okko
Copy link
Contributor

@okko okko commented Aug 6, 2025

Includes #2899
Fixes #2789

@mikicho
Copy link
Contributor

mikicho commented Aug 6, 2025

Thank you @okko!
The thing is that I'm still wondering if we should support plain object errors. IIRC, this is valid from the node perspective, also not sure how useful it really is.

@okko
Copy link
Contributor Author

okko commented Aug 7, 2025

Same here, I don't know what the use case for that would be, but can't rule it out. I would merge at least #2899 to document usage that better reflects what Node apparently does internally.

Then maybe wait with this #2900. On the other hand, reverting this is super easy if someone presents a use case.

Copy link
Contributor

@mikicho mikicho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, the fix is pretty easy form suer perspective as well, so let's merge this and see if we get any pushback

@mikicho
Copy link
Contributor

mikicho commented Aug 11, 2025

@okko can you please:

  1. Fix the format
  2. Remove the support for
  3. Remove the skipped test (or add one with an error object if it does not already exist, please)

@okko okko changed the title types, test: Use Error objects instead of plain objects with replyWithError() doc, types, test: Use Error objects instead of plain objects with replyWithError() Aug 12, 2025
@okko
Copy link
Contributor Author

okko commented Aug 12, 2025

@mikicho Thanks! I fixed formatting and enabled the test. I didn't get the 2nd point of your comment, was there a word missing?

@mikicho mikicho enabled auto-merge (squash) August 12, 2025 15:39
@mikicho mikicho merged commit f2a3389 into nock:main Aug 12, 2025
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replyWithError with object does not work since beta-8+
2 participants