Closed willsmanley closed 1 month ago
Also, howdy fellow texan
im assuming i should be using @cloudflare/itty-router-openapi
, will try that now
looks like switching to @cloudflare/itty-router-openapi
works, but i guess it lacks some of the sugar methods like json and error. is this what folks are recommended to do? if so it might be good to reference in the docs. i randomly stumbled upon this in a google search but it wasnt very obvious.
Firstly thank you for the amazing work on this super nice router!
There might have been a change, either on the itty side or on the cloudfare side, that is causing the library to be incompatible with workers for some reason.
I ran my own thing locally and it worked great. But got this strange, unhelpful exception from cloudfare:
I kept banging my head into the wall until I finally tried someone's example from a blog from Nov 2023: https://www.raymondcamden.com/2023/11/17/adding-simple-routing-to-cloudflare-workers
I copied his working code exactly and got the same result, so it must be a breaking change somewhere.
To repro, just copy his code into a cloudfare worker and then invoke it. Turn on observability so that you can see the exception logged.
Please let me know if I can help dig into it further!