anze3db / fedidevs

Discover amazing developers across the fediverse 🌐
https://fedidevs.com
MIT License
24 stars 6 forks source link

Server returns 500 when log in when instance doesn't exist #61

Closed anze3db closed 3 months ago

anze3db commented 3 months ago

User report: https://masto.bike/@tornooc/112841442087455063

They typed in mato.bike and received a 500. They should have received a 400 with a message explaining what went wrong.

vasnt commented 3 months ago

image

Is this code needs to be updated? (Found via keyword search:500)

anze3db commented 3 months ago

Close, but the issue was actually that I was returning a dict instead of a proper response object here: https://github.com/anze3db/fedidevs/commit/bc84bab6c446b184db2ac1dbebf61b567ca2741b#diff-5307968e43cf64cb0cd38b9f1c4f12f916f73461034fc2644d2f42ffb8be6a21L73-L75

The solution is not perfect, but should be an improvement. Closing this issue.

Screenshot 2024-07-26 at 09 13 13