Skip to main content

Unknown or invalid profile IDs make /api/users/by-id return 500

how to reproduce:

open dev tools → Network tab

go to flackle.com/app/profile/123 (or flackle.com/app/profile/abc)

look at the GET /api/users/by-id/123 request

expected: a user ID that doesn’t exist (or isn’t a number) returns 404, and the page shows “User not found”.

actual: the page does show “User not found”, but GET /api/users/by-id/{id} returns 500 for both a numeric ID that doesn’t exist (123) and a non-numeric one (abc). The server is throwing an error instead of handling the missing user, so these show up as server errors, and anything that retries on 5xx will keep retrying. Non-numeric IDs could probably be rejected with 400 before they hit the database.

(Different from the invalid server ID post, which is about /api/servers/… returning 404s.)

browser: Brave on Windows 11

Platform
Web
OS version
Windows 11
Flackle version

Log in to comment and vote

No comments yet

Be the first to share your thoughts.