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

adjust to new error formats #6

Open
gr2m opened this issue Nov 24, 2013 · 0 comments
Open

adjust to new error formats #6

gr2m opened this issue Nov 24, 2013 · 0 comments

Comments

@gr2m
Copy link
Contributor

gr2m commented Nov 24, 2013

Okay, that might sound confusing. What I mean is that we want to normalize the frontend error handling by following JavaScript's Error conventions of having a name and a message property. At the moment, we usually (but not always) followed CouchDB's way having an error and a reason property.

As we change it throughout the code in the frontend, it will be needed to be changed in the backend as well, at least where objects are updated with an $error property, like in
https://github.com/hoodiehq/hoodie-plugin-users/blob/master/lib/password_reset.js#L53

That should now read

$error: {
  name: 'HoodieNotFoundError',
  message: util.format('user %s could not be found', username),
  username: username
}

If you don't see any reasons, I'd let you know as soon as the frontend code code is ready, so we can publish all at once:
hoodiehq/hoodie#173

Hope that makes all sense?

@ghost ghost assigned caolan Nov 24, 2013
janl added a commit that referenced this issue Aug 4, 2014
Fix npm issue (npm 1.2.20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants