Skip to content

feat(fetch): pass validation error to hooks #50

Open
kwonoj wants to merge 3 commits intobetter-auth:mainfrom
kwonoj:feat-validation-hook
Open

feat(fetch): pass validation error to hooks #50
kwonoj wants to merge 3 commits intobetter-auth:mainfrom
kwonoj:feat-validation-hook

Conversation

@kwonoj
Copy link

@kwonoj kwonoj commented Jul 19, 2025

Attempt to close #42.

PR adjusts hooks with validation errors, pass it to the hooks before throw it. To allow distinguish between error types, now error context have type property. The existing behavior is preserved if hooks are not provided.

@vercel
Copy link

vercel bot commented Jul 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
better-fetch-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 20, 2025 6:57am

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Question: onError / onValidationError hook for the validation failures?

2 participants