Skip to content

Consume normalized ApiErrorDto in remote functions #128

Description

@a9ex

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

  • I have searched for existing issues to avoid duplicates

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions