KV Put is not working have worker paid account

Also, I am having trouble using KV with Durable objects, I keep getting this error when using the put command
[wrangler:err] SyntaxError: Unexpected end of JSON input
[wrangler:err] SyntaxError: Unexpected end of JSON input
Sample code I am using with YOUR_KV_NAMESPACE being replaced with the KV I am using

await this.env.YOUR_KV_NAMESPACE.put("test", { "connectedAt": this.getCurrentTimeFormatted() });

await this.env.YOUR_KV_NAMESPACE.put("test", { "connectedAt": this.getCurrentTimeFormatted() });
1 Reply
Dragonlord
DragonlordOP4mo ago
I am curious if my account is messed up because even if i do
await this.env.YOUR_KV_NAMESPACE.put("test");
await this.env.YOUR_KV_NAMESPACE.put("test");
I get the same error solved my .toml file was wrong my bindings were being seen under the vars variables
Want results from more Discord servers?
Add your server