Fix error messages rendering as literal "[object Object]"
apiFetch assumed detail was always a string, but FastAPI's own 422
validation errors shape it as a list of {loc, msg, type, ...} objects
- that list became the ApiError's message, and React stringified it
to the literal text "[object Object]" wherever it got rendered (hit
live on prod's Sign up form). Extracts and joins the real msg from
each validation item instead, falling back to the generic status
message when detail isn't a recognizable shape.
Showing
Please
register
or
sign in
to comment