Trying to store some data with { storage } from ‘@forge/api’
I am getting:
ERROR 21:02:16.934 65efc535-724b-43c6-9d4f-67996567a7b6 Error Saving: APIError: Unknown error. Received status code ‘407’
at Function.forStatus (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/errors.js:32:1)
at getResponseBody (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/global-storage.js:14:1)
at GlobalStorage.mutation (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/global-storage.js:121:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at GlobalStorage.set (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/global-storage.js:71:1)
at onSubmit (webpack://jira-service-management-assets-import-type-ui-kit/src/index.jsx:23:1)
at Object.onSaveFn (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/components.js:166:1)
at (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/reconcile.js:31:1)
at asyncMap (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/reconcile.js:13:1)
at (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/reconcile.js:34:1)
ERROR 21:02:16.934 65efc535-724b-43c6-9d4f-67996567a7b6 APIError: Unknown error. Received status code ‘407’
at Function.forStatus (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/errors.js:32:1)
at getResponseBody (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/global-storage.js:14:1)
at GlobalStorage.mutation (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/global-storage.js:121:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at GlobalStorage.set (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/storage/out/global-storage.js:71:1)
at onSubmit (webpack://jira-service-management-assets-import-type-ui-kit/src/index.jsx:23:1)
at Object.onSaveFn (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/components.js:166:1)
at (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/reconcile.js:31:1)
at asyncMap (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/reconcile.js:13:1)
at (webpack://jira-service-management-assets-import-type-ui-kit/node_modules/@forge/ui/out/reconcile.js:34:1)
Code after being submitted in a form:
try {
await storage.set('SFTPHost', sftp_host_temp);
await storage.set('SFTPPort', sftp_port);
await storage.set('SFTPUser', sftp_user);
await storage.set('SFTPPassword', sftp_password);
await storage.set('SFTPPath', sftp_path);
await storage.set('objectType', objectType);
} catch (err) {
console.error('Error Saving:', err);
throw err;
}