-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
This is more of a question than it is an issue. Is there any way to pass a variable into the error message?
If I have the following error message:
throw new Error(
`There was no user found with the username, ${username}.`
);
How can I get that username into the apollo-errors? Is there a way to pass it as an argument?
throw new err.IncorrectUsernameError(username);
Inside my error file that imports apollo-errors:
exports.IncorrectUsernameError = createError('IncorrectPasswordError', {
message: `There was no user found with the username, ${username}.`,
});
Please let me know if there is some way to accomplish this.
Nawasrah and highri5e
Metadata
Metadata
Assignees
Labels
No labels