Molunerfinn/PicGo · warning
TIPS_UPLOADER_CONFIG_NAME_EMPTY
Error message
TIPS_UPLOADER_CONFIG_NAME_EMPTY
What it means
The UPDATE_UPLOADER_CONFIG route requires a non-empty _configName when updating an existing config (configId present). If config._configName is not a non-empty string, it throws TIPS_UPLOADER_CONFIG_NAME_EMPTY. Names identify configs within an uploader type's list and are used for rename diffing.
Source
Thrown at src/main/events/rpc/routes/config.ts:102
return fail(e)
}
})
.add(IRPCActionType.SELECT_UPLOADER, async (args) => {
try {
const [type, configName] = args as ISelectUploaderConfigArgs
const activeConfig = picgo.uploaderConfig.use(type, configName)
notifyAppConfigUpdated()
return ok(activeConfig._id)
} catch (e) {
return fail(e)
}
})
.add(IRPCActionType.UPDATE_UPLOADER_CONFIG, async (args) => {
try {
const [type, configId, config] = args as IUpdateUploaderConfigArgs
const configName = typeof config._configName === 'string' ? config._configName : ''
if (configId && !configName) {
throw new Error(T('TIPS_UPLOADER_CONFIG_NAME_EMPTY'))
}
let oldConfigName = ''
if (configId) {
const configList = picgo.uploaderConfig.getConfigList(type)
const existConfig = configList.find(item => item._id === configId)
if (!existConfig) {
throw new Error(T('TIPS_UPLOADER_CONFIG_NOT_FOUND'))
}
oldConfigName = existConfig._configName
}
if (oldConfigName && oldConfigName !== configName) {
picgo.uploaderConfig.rename(type, oldConfigName, configName)
}
picgo.uploaderConfig.createOrUpdate(type, configName, config)
notifyAppConfigUpdated()
return ok(true)View on GitHub (pinned to 07ec7068a5)
Solutions
- Include a non-empty _configName in the config payload when a configId is provided
- In the edit form, prefill _configName from the existing config and validate it's non-empty before submitting
- If the caller only wants to change settings without naming, pass through the existing config's _configName unchanged
Example fix
// before
await updateUploaderConfig(type, configId, { ...settings }) // _configName missing
// after
await updateUploaderConfig(type, configId, { ...settings, _configName: existing._configName }) Defensive patterns
Strategy: validation
Validate before calling
if (configId && (typeof config._configName !== 'string' || !config._configName.trim())) {
throw new Error('_configName is required when updating an existing config')
} Type guard
function hasConfigName(config) {
return typeof config._configName === 'string' && config._configName.trim() !== ''
} Try / catch
try {
await updateUploaderConfig(type, configId, config)
} catch (e) {
if (e.message.includes('CONFIG_NAME_EMPTY')) {
config._configName = originalConfig._configName
await updateUploaderConfig(type, configId, config)
} else throw e
} Prevention
- Always copy _configName from the existing config into update payloads
- Require the name field in edit forms and validate non-empty
- Never strip underscore-prefixed meta fields (_id, _configName) when spreading config objects
When it happens
Trigger: Calling UPDATE_UPLOADER_CONFIG with [type, configId, config] where configId is truthy but config._configName is undefined, null, or '' — e.g. a form that omits the name field on edit.
Common situations: Editing an existing uploader profile after the name input was cleared; client code that builds the config payload without copying _configName; older clients sending a payload shape missing the field after an API change.
Understand the failure class
Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.
Related errors
- Config not found
- TIPS_UPLOADER_CONFIG_CANNOT_DELETE_LAST
- TIPS_UPLOADER_CONFIG_NOT_FOUND
- Failed to change current uploader
- Failed to delete provider config
AI-assisted analysis of Molunerfinn/PicGo@07ec7068a5 (2026-08-30).
Data as JSON: /api/errors/0c9455ee7c33f392.
Report an issue: GitHub.