Ballsdex-Team / BallsDex-DiscordBot

Collect and exchange countryballs on Discord
Other
95 stars 156 forks source link

admin-panel: 500 error - data type checks #101

Open mpede opened 1 year ago

mpede commented 1 year ago

Hi there, your work and this bot are much appreciated. I am self-hosting this code, hopefully this feedback helps. I shall open a number of issues - please close/manage at your convenience.

in the admin-panel, if you do not satisfy the correct data type, it will throw a 500 error, but the detailed error msg is only in the logs, the admin user (with no access to logs) will not know whats happening.

A few examples: string instead of integer for health, attack, etc - but also for emoji id - in addition all discord ids are checked to have 17-19 digits. All this will give 500 error in the UI without details.

Furthermore the admin in the UI needs to start over again with entering all values again from scratch (frustrating).

Can these errors not be caught and handled in the code? the 500 screen seems to be native from fastapi or tabler.

Chris

flaree commented 1 year ago

Hey,

Yep the admin panel is quite finnicky. Currently we have no plans to update this as one of our stretch goals is to create a new panel in it's entirety. We are drawing up plans for our future architecture and how it will look in the future.

mpede commented 1 year ago

check out an open source tool called directus https://github.com/directus/directus the UI is quite OK

flaree commented 1 year ago

Thanks for the suggestion, i'll definitely have a look at it.

I believe our current plans was maybe to use django as a couple of us have experience with it