Skip to content

Conversation

@iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Apr 25, 2025

  • Now extends Error, so that it satisfies instanceof Error operations.
  • Narrows the status property to be an actual HTTP status code.
  • Outsources default evaluation of the message property to @std/http/status, which already implements this functionality.
  • Brings the stack property to the class, regardless of its status, which seems like a needless constraint.

@iuioiua iuioiua changed the title refactor(core): have HttpError extend Error refactor(core): standardize HttpError Apr 25, 2025
@iuioiua iuioiua marked this pull request as ready for review April 25, 2025 22:48
Copy link
Collaborator

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

LGTM

@marvinhagemeister marvinhagemeister merged commit 7aec5a2 into denoland:main Apr 27, 2025
7 checks passed
@iuioiua iuioiua deleted the HttpError-extends-Error branch April 27, 2025 18:34
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.

2 participants