leaderboardsgg / leaderboard-backend

The backend for Leaderboards.gg. Also holds public-facing APIs.
https://info.leaderboards.gg
GNU General Public License v3.0
12 stars 16 forks source link

Bug: Incorrect Error Responses on Failed Leaderboard Creations #214

Closed zysim closed 2 weeks ago

zysim commented 3 months ago

We don't have expected error behaviour for creating Leaderboards.

Step(s) to Reproduce

  1. Create a Leaderboard with an existing name/slug
  2. Create a Leaderboard with missing/invalid fields

Expected Result

  1. Existing name/slug should 409
  2. Missing/invalids should 422

Actual Outcome

  1. Existing names/slugs 500s
  2. Missing/invalids 400s
TheTedder commented 3 months ago
* Fetching users:

  * Fetching by ID doesn't work; request param validation outdated

Can you elaborate on this? What exactly is the issue?

zysim commented 3 months ago

Can't fetch users by ID because the request validation failed. And it's because the validation is based on an old set of rules.

TheTedder commented 3 months ago

It worked for me when I tried it, at least after making the changes in #215.