kwhitley / itty-durable

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

Calling a DO with a missing method returns incomplete error message #8

Closed grempe closed 1 year ago

grempe commented 3 years ago

If I call a DO class with a method that has not yet been implemented on it I get a message like:

{
    "error": "Durable Object I does not contain method foo()",
    "status": 500
}

Notice the name of the object printed is just I every time.

https://github.com/kwhitley/itty-durable/blob/v0.x/src/itty-durable.js#L63

kwhitley commented 1 year ago

Good catch - this is super old, but the problem appears to be with the minification. By the time the error is thrown, the constructor name is already long lost. Removing that in the upcoming version!