labrinth icon indicating copy to clipboard operation
labrinth copied to clipboard

Invalid game versions get reported counter intuitively

Open Siphalor opened this issue 4 years ago • 0 comments

Describe the bug If one tries to perform an version upload with illegal characters in a game version, the server will only vaguely refer to the game version as category/version.

This causes confusion as in the context of mod version uploads the word version has a different connotation.

To Reproduce Try to perform an upload with Minotaur or another client with a game version that has e.g. a comma in it.

The server will respond with: Database Error: Invalid identifier: Category/version names must contain only ASCII alphanumeric characters or '_-'.

Example JSON request:

{
    "mod_id": "noooiice",
    "version_number": "1.0.0-something",
    "version_title": "1.0.0",
    "version_body": "These are some fine changes",
    "release_channel": "release",
    "game_versions": [
        "this-will,fail"
    ],
    "loaders": [
        "fabric"
    ],
    "dependencies": [],
    "file_parts": [
        "0"
    ],
    "featured": false
}

Expected behavior The API should call game versions "game versions" to avoid confusion with mod versions that have laxer rules.

Additional context First brought up and discussed on the Modrinth Discord.

Siphalor avatar Jun 04 '21 22:06 Siphalor

This now returns Invalid Input: No database entry for game version provided.

triphora avatar Sep 05 '22 03:09 triphora