speedruncomorg / api

REST API Documentation for speedrun.com
346 stars 36 forks source link

`POST /runs` to an individual level category fails if values are not set for variables that only impact other IL categories #145

Open ItsMaximum opened 2 years ago

ItsMaximum commented 2 years ago

Attempting to POST a run to Level 25 of Red Ball 2 on the Red Ball Category Extensions Leaderboard https://www.speedrun.com/rbce/level/25#Red_Ball_2 yielded this error:

{ "status": 400, "message": "There are problems with your submitted run, see the errors attached.", "errors": [ "You have not specified a value for variable 789xw568 (Speed Conversion (Red Ball 4 Vol.1)), but the variable is mandatory.", "You have not specified a value for variable 2lg3623n (Speed Conversion (Red Ball 4 Vol.2)), but the variable is mandatory.", "You have not specified a value for variable wl31rg98 (Speed Conversion (Red Ball 4 Vol.3)), but the variable is mandatory.", "You have not specified a value for variable j84g6048 (Deterministic Patch), but the variable is mandatory." ], "links": [ { "rel": "support", "uri": "irc:\/\/speedrunslive.com#speedrun.com" }, { "rel": "report-issues", "uri": "https:\/\/github.com\/speedruncom\/api\/issues" } ] }

The four variables specified only have their scope set to the Red Ball 4v1, Red Ball 4v2, Red Ball 4v3, and Red Ball 1 categories respectively. By specifying a value for all four variables, a submission was able to go through: https://www.speedrun.com/rbce/run/zn71433m , thankfully without any arbitrary variables attached.

PolariTOON commented 2 years ago

I think that's a duplicate of #117