-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Exception thrown by withContent #224
Comments
Which version are you using? As of As of Now, theoretically if you wanted to stay on the older version, you could do one of the following:
Hope that helps! |
Ahhhh ok excellent. I'm on v4.0.27. I'll upgrade and test it. Right those samples make sense too! Thanks, good stuff 👍 IttyRouter is freakin cool.... really like it |
Confirming I no longer get unhandled exceptions with IR... thanks! |
Awesome, glad to hear it! Btw, in general, I'm pretty terrible about noticing issues in time (got lucky tonight) - I'd def recommend joining our discord channel where the wonderful community folks are WAY faster to answer questions! |
I love to hear that! Brace yourself for some big changes (in a good way)! We have |
Describe the Issue
If I send a malformed request to my API using withContent, it throws an unhandled exception. How do I wrap withContent with a try/catch?
Example Router Code
N/A - send a malformed request POST to any of your withContent handlers
Request Details
url - https://api.x.co/auth/login
body - "sample_invalid_input" (should be json for example)
Expected Behavior
A caught exception
Actual Behavior
An uncaught exception
Environment (please complete the following information):
Cloudflare Workers
The text was updated successfully, but these errors were encountered: