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

Errors from sails (validations) aren't handled properly #31

Open
danshapir opened this issue Oct 6, 2015 · 0 comments
Open

Errors from sails (validations) aren't handled properly #31

danshapir opened this issue Oct 6, 2015 · 0 comments

Comments

@danshapir
Copy link

Hey.

I've also created a PR for that: #30 , but just in case:

under the ajaxError function you've checked the data.errors, but sails response is with data.error not errors, so it never entered that place and just throw a new Error(data) instead. Same happened in the processRequest function where you did use the isErrorObject function, but then checked again for that .errors property that doesn't exists.

Here is the response I for from the server:
image

As you can see, no errors property

I'm using sails 11.2 with sanestack if that matters.

Thanks,
Dan

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