Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix INVALID_COOKIE_SIGNATURE error not calling onError handler #839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nxht
Copy link

@nxht nxht commented Sep 20, 2024

  • fixes onError handler isn't getting called during INVALID_COOKIE_SIGNATURE #707
  • test added under test/lifecycle/error.test.ts
    • Not sure if it's the correct place to be instead of core/handler-error.test.ts or cookie/signature-test.ts
  • Simply moved the hasCookie after try { (before body parsing)
    • It might be better to give separate try catch but I wasn't sure
    • It made more sense to be move the logic after body parsing like in dynamic handler case but I was trying to minimize the change.
    • Also, this leaves other errors like t.Cookie required secret which is not set in ... to still have same issues

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.

onError handler isn't getting called during INVALID_COOKIE_SIGNATURE
1 participant