Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor error collection and display #131

Open
jadefish opened this issue Apr 3, 2019 · 0 comments
Open

Refactor error collection and display #131

jadefish opened this issue Apr 3, 2019 · 0 comments

Comments

@jadefish
Copy link
Collaborator

jadefish commented Apr 3, 2019

Problem

The current process for aggregating and displaying errors from server responses is not capable of handling deeply-nested error structures (e.g. nested Dry validation schemas, arrays).

Additionally, only client-side errors are visually associated with their failing element.

Context

The current implementation yields the following behavior:

  • Nested error structures result in displaying [object Object] in the nearest error <div> element.
  • All errors collected from server responses are displayed in the nearest error <div> element instead of close to or within each error's associated element.

Proposed solutions

  • All error collection and display should be capable of handling errors structures of arbitrary depth.
  • Errors collected from responses should be displayed alongside their associated element.
  • Page-level errors (the nearest error <div> element behavior) should be used only when an error cannot be associated with an element (e.g., errors describing a loss of network connectivity).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant