When using an instrumented Durable Object, calling storage.list() without supplying any arguments will throw TypeError: Cannot set properties of undefined (setting 'do.storage.number_of_results').
This is caused by the instrumentation of DurableObjectStorage attempting to mutate the first argument, which does not exist in this case.
Workaround
The workaround for this is simply to pass an empty object like storage.list({}).
Description
When using an instrumented Durable Object, calling
storage.list()
without supplying any arguments will throwTypeError: Cannot set properties of undefined (setting 'do.storage.number_of_results')
.This is caused by the instrumentation of
DurableObjectStorage
attempting to mutate the first argument, which does not exist in this case.Workaround
The workaround for this is simply to pass an empty object like
storage.list({})
.