Summary
Use the backend's normalized ApiErrorDto in frontend remotes instead of hardcoding error strings or falling back to generic 500 errors.
Motivation
The backend already returns a unified json { statusCode, error, message, issues? }.
Currently, the frontend ignores this DTO, duplicates hardcoded strings across switch (status) blocks, and swallows detailed backend errors behind a generic error(500, "An error occurred").
Proposed Solution
Add a helper to parse ApiErrorDto from the API response
Checklist
Summary
Use the backend's normalized
ApiErrorDtoin frontend remotes instead of hardcoding error strings or falling back to generic 500 errors.Motivation
The backend already returns a unified json
{ statusCode, error, message, issues? }.Currently, the frontend ignores this DTO, duplicates hardcoded strings across
switch (status)blocks, and swallows detailed backend errors behind a genericerror(500, "An error occurred").Proposed Solution
Add a helper to parse
ApiErrorDtofrom the API responseChecklist