Version: 1.0.0
Error: cosmetic-mod-invalid
Category: Modding
Error handling example for attempting to install a cosmetic mod with an invalid manifest. The validation endpoint returns detailed errors and warnings that guide the modder toward fixing the mod before installation.
Endpoint: cosmetic-mod-validate
Request:
{
"method": "POST",
"url": "http://localhost:8080/api/cosmetic-mods/validate",
"body": {
"file": "path/to/invalid-mod.zip"
}
}
Response (400):
{
"valid": false,
"errors": [
"Invalid modId format: must match pattern ^[a-z0-9-]+$",
"Missing required field: manifest.version",
"Invalid struct type ID: 'invalid-type' does not exist in game"
],
"warnings": [
"Missing fallback language (en) in localizations",
"Referenced animation file not found: animations/miner-idle.json"
],
"modId": null,
"version": null
}
Action: Fix mod file and retry
Do not attempt to install invalid mods. Always validate first.
response.body.errorsmanifest.json with correct modId format and required fieldsRetry: No (fix errors first, then re-validate)
COSMETIC_MOD_INVALIDCOSMETIC_STRUCT_TYPE_NOT_FOUNDCOSMETIC_MOD_INVALID)