What to do if you cannot update your customization settings
yogarasu opened this issue · 1 comments
Package
- @kintone/customize-uploader 6.0.5
Why
I created my own deployment tool in a project that is more general than Kintone CLI.
As a mechanism for deployment tools, you need to upload and update customized JS and CSS files.
The file upload itself works fine, but in rare cases it may not be possible to update the customization settings.
The cause is unknown, but when I look at the Kintone app settings in my browser, I keep getting the message "Preparing for processing". This is obviously not normal, but it will resolve in a few minutes.
Perhaps because of this effect, updateCustomizeSetting () does not return the resulting revision.
import KintoneApiClient from "@kintone/customize-uploader/dist/KintoneApiClient"
const param = {
app: "1",
scope:"ALL",
desktop: {
js: [],
css: [],
},
mobile: {
js: [],
css: [],
},
}
const result = await kintoneApiClient.updateCustomizeSetting(param)
console.log(result)
What
I noticed this and implemented error handling when nothing was returned, so it's okay right away.
I don't know how to reproduce the problem of not being able to update, so I'll leave it for a while, but I think it's hard to notice that it can't be updated with the current implementation.
At least I think it's better to raise an exception or return an error status than to return nothing, but what about?
I was thinking of creating a bug report, but I will post it here for the time being.
Also, since I am Japanese, I can respond even if I speak in Japanese.
Thank you for your reporting. The customize-uploader is designed for a CLI tool, so it does not officially provide internal packages as using import
. You can use rest-api-client, and you can find an example from the following:
js-sdk/examples/rest-api-client-demo/src/app.ts
Lines 409 to 414 in bca0d98
The message "Preparing for processing" may occur when deploying an app is delayed in Kintone. We will reproduce your situation and improve an error or the use of the SDK if possible.
Thank you.