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

Add third party libraries support #2

Open
theGlenn opened this issue Jun 8, 2018 · 0 comments
Open

Add third party libraries support #2

theGlenn opened this issue Jun 8, 2018 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@theGlenn
Copy link
Owner

theGlenn commented Jun 8, 2018

The idea is to allow user to replace something like the following code:

export class UserNotFoundError extends PythianError {
  constructor(properties?: Record<string, any>) {
    super("UserNotFoundError", "No user found", "USER_NOT_FOUND", properties);
  }
}

With a custom definition like below using a library like apollo-errors:

export const UserNotFoundError = createError('UserNotFoundError', {
  message: "No user found"
});

Not sure how to implement this suggestion greatly welcomed.

@theGlenn theGlenn added enhancement New feature or request help wanted Extra attention is needed labels Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant