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

Fix missing validation error display in writing (create/update) operations #11

Closed
asishallab opened this issue Feb 15, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@asishallab
Copy link
Member

The old RESTful application successfully displayed validation error messages.
The related component is

To fix the display you just have to extract the error messages correctly and set them in the respective components. How this has to be done can be seen in the above components. It might be helpful to run in an interactive node environment the creation of a record and intentionally cause a validation error to be able to inspect its structure.
For example start node in a sandbox test graphql-server with some playground models. Then var models = require('src/models/index.js'). Then models.book.create( {name: 124} ), ensure that in book there is a string validation. Now you should see a validation error and can inspect its structure.

Based on the above you can write an integration test.

IMPORTANT: Global error

The above components can display global errors, if the validation error is not associated with a certain attribute, or if another unexpected error occurs. To display that, please use the component implemented in this Issue of single page application.

Expected work time: 2d

@vsuaste
Copy link
Contributor

vsuaste commented Feb 21, 2019

Done. Commits #96d4bb #f09164 #7ca107 #eaa01e

@vsuaste vsuaste closed this as completed Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants