I am using the Storage API to store a value if it doesn’t already exist.
I have added the scope in the permissions:
permissions:
scopes:
- storage:app
The code does nothing extraordinary:
import { storage } from '@forge/api';
export async function addValue(value) {
let _getValue = await storage.get("register");
if(!_getValue ) {
await storage.set("register", {"id": value});
}
});
The app is deployed in development without problems, but storage.get() call returns a status code 431:
Error: Unknown error. Received status code '431'
at Function.forStatus (index.js:1443:16)
at getResponseBody (index.js:1474:33)
at GlobalStorage.query (index.js:1577:22)
at async GlobalStorage.getInternal (index.js:1558:48)
at async addValue(index.js:10444:23)
I have the packages updated to the latest versions. I have searched for information about the problem but have not found anything.