Skip to content

feat: replace @hapi/boom with built-in HipError class#96

Open
Sarita-Joshi wants to merge 1 commit intotrycatchal:masterfrom
Sarita-Joshi:feat/replace-boom-with-hiperror
Open

feat: replace @hapi/boom with built-in HipError class#96
Sarita-Joshi wants to merge 1 commit intotrycatchal:masterfrom
Sarita-Joshi:feat/replace-boom-with-hiperror

Conversation

@Sarita-Joshi
Copy link
Copy Markdown
Contributor

Removes @hapi/boom as a dependency entirely and replaces it with a lightweight HipError class in core.ts.

  • HipError(statusCode, message) replaces all Boom.xxx() calls
  • HipError.isHipError() replaces Boom.isBoom() checks
  • .output property preserved for backwards compatibility with existing adapters
  • Updated in core.ts, mongoose.ts, zod.ts, and package.json
  • Build compiles cleanly, zero Boom references remaining

BREAKING CHANGE: Consumers catching Boom errors should catch HipError instead.

Removes the @hapi/boom dependency entirely and replaces it with a
lightweight HipError class defined in core.ts. This gives hipthrusts
its own error type with no external dependencies, making it simpler
for consumers (no need to import or know about boom).

HipError has statusCode, message, and a static isHipError() type guard.
Adapters catch HipError directly instead of checking Boom.isBoom().

BREAKING CHANGE: Consumers that caught Boom errors from hipthrusts
should now catch HipError instead. The .output property is preserved
for backwards compatibility with existing adapter code.
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.

1 participant