NamelessMC / Nameless

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.
https://namelessmc.com/
MIT License
612 stars 311 forks source link

Remove unable to update groups catch #3360

Closed Derkades closed 1 year ago

Derkades commented 1 year ago

Catching all exceptions and returning a custom 500 error doesn't seem to improve API usability, and it hides valuable debug info. If the API returns a stack trace, the plugin will show it to the user making bug reports easier.

partydragen commented 1 year ago

Its not hidden at all its displayed in meta while it make it return json

all api results should return in json even if its a error, API is also not just for the plugin only

Derkades commented 1 year ago

all api results should return in json even if its a error

It should for expected errors, but I wouldn't say it should still return json for programming errors? There is an actual bug here that is not supposed to ever happen. We happen to have a try-catch here, but usually programming errors wouldn't be catched like this