Getting DOMException when trying to store an object in durable object storage

Error :
DOMException at line 0, col -2

Code :
let model = await cocossd.load();
await this.state.storage.put(“model”, model);

I have verified model is loaded

Do you have a minimal code example you can share that reproduces the problem?

1 Like

async fetch(request) {
// Apply requested action.
let url = new URL(request.url);
let model = await cocossd.load();
await this.state.storage.put(“model”, model);

return new Response(model);

}

I am using durable-objects-webpack-commonjs template and the above fetch method is there in counter.js

I’m not familiar with cocossd, and the snippet you posted doesn’t include how you’re depending on it or configuring it; do you have a complete example?

1 Like