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

Provide more details on validation errors #24

Open
oliverheywood451 opened this issue Dec 7, 2022 · 0 comments
Open

Provide more details on validation errors #24

oliverheywood451 opened this issue Dec 7, 2022 · 0 comments

Comments

@oliverheywood451
Copy link
Collaborator

oliverheywood451 commented Dec 7, 2022

To understand the motivation here, imagine a UI where a marketplace is built by dragging and dropping OC resources and connecting them up visually in a diagram. Maybe assignments are arrows. This library could help support such a tool by providing insight into what diagrams are valid or invalid. But it would have to provide very specific, useful info on where any problems lie.

Currently an error is simply a string. It needs to be a strongly-typed object.

  • It should include all information about where the error can be found - resource type, resource ID, parent resource ID, property. (What to do if no ID?)
  • It should include an error type from an enum of options - foreign key, required field, data type, ect.
  • It should include any relevant data about other fields that influence this error. For example, the securityprofile.userID field can be valid or invalid depending on the securityprofile.buyerID field.
  • A message string field is probably still needed. But the ideal goal would be to be able to generate the message based on the data in the error
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