Bot-detector / Bot-Detector-Core-Files

The server and processing files for the Bot Detector Plugin
GNU General Public License v3.0
17 stars 15 forks source link

Use http error in 400 range for player not found in feedback #467

Closed Cyborger1 closed 1 year ago

Cyborger1 commented 1 year ago

Using a 500 error doesn't make much sense, and also means the plugin doesn't try to parse the message as it expects it only on 400 range errors.

I'll leave it up to you to decide a proper error code. But 404, 409 or 422 are good candidates. (I think you usually use 422 for this kind of stuff?)

https://github.com/Bot-detector/Bot-Detector-Core-Files/blob/312881d31214d920b2060db7ee431e91f3ecaa8d/api/routers/feedback.py#L128