kwhitley / itty-durable

Cloudflare Durable Objects + Itty Router = shorter code
MIT License
236 stars 18 forks source link

fix: actually fall back to text or raw response if no JSON is returned #34

Closed AlCalzone closed 11 months ago

AlCalzone commented 1 year ago

I noticed that with parse: true, my DO methods that returned a non-JSON string caused JSON.parse errors. This was because the catch clauses never actually did anything, because the transformResponse method returned the Promise without handling errors.

AlCalzone commented 11 months ago

Seems to be fixed in 2.x