Version: 1.0.0
Error: cosmetic-mod-conflict
Category: Modding
Error handling example for attempting to install a cosmetic mod that conflicts with an already-installed mod. Mod conflicts occur when the same modId and version already exist.
Endpoint: cosmetic-mod-install
Request:
{
"method": "POST",
"url": "http://localhost:8080/api/cosmetic-mods/install",
"body": {
"file": "path/to/guild-alpha-miner-v1.zip",
"validate": true,
"activate": true
}
}
Response (409):
{
"error": "Mod conflict",
"code": 409,
"details": [
"Mod 'guild-alpha-miner-v1' version 1.0.0 already installed",
"Existing mod path: ~/.structs/mods/guild-alpha-miner-v1",
"Use uninstall endpoint to remove existing mod first"
]
}
Action: Uninstall existing mod or use a different mod ID
Check existing mod – Query the existing mod to see its current version and status:
GET http://localhost:8080/api/cosmetic-mods/guild-alpha-miner-v1
Decide on resolution – Choose one of two options:
Option A: Uninstall existing mod
DELETE /api/cosmetic-mods/guild-alpha-miner-v1POST /api/cosmetic-mods/install (with the new mod)Option B: Use a different ID or version
modId or bumped versionPOST /api/cosmetic-mods/install (with the updated mod)Execute resolution – Perform the chosen option above
Retry: No (resolve the conflict first)
COSMETIC_MOD_CONFLICTCOSMETIC_MOD_CONFLICT)