LAMaglan / PokeFightSimulator

A (simple) fight simulator between any two Pokemon using FastAPI with Jinja frontend
0 stars 0 forks source link

Modification to on_startup of getting all pokemon names #56

Open LAMaglan opened 5 months ago

LAMaglan commented 5 months ago

Add logging and/or catch exceptions to the on_startup_names: i.e. for when it crashes due to no internet connection, and another for when still cannot get pokemon, and maybe if input is different format than expected

Alternatively, consider not making it a startup event, but rather an endpoint that gets triggered by a specific button (then, if it does not work, will not seem like whole app is not working) but will then have to disable everything (or at least something so crash for the other endpoints make sense).

LAMaglan commented 5 months ago

Added logging and exception here in commit https://github.com/LAMaglan/PokeFightSimulator/commit/3041e24895ddabd38f3603972d3b87d922ce0000 (forgot to do in own branch and the create PR)