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

Common FakerJSError #707

Closed
xDivisionByZerox opened this issue Mar 28, 2022 · 0 comments · Fixed by #718
Closed

Common FakerJSError #707

xDivisionByZerox opened this issue Mar 28, 2022 · 0 comments · Fixed by #718
Assignees
Labels
c: feature Request for new feature p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug

Comments

@xDivisionByZerox
Copy link
Member

xDivisionByZerox commented Mar 28, 2022

Clear and concise description of the problem

When faker-js throws an error it's hard to track for end-users where this error comes from

Suggested solution

Provide a custom FakerJsError class that prefixes all error messages with the libraries name:

class FakerJsErrorr extends Error {
    constructor(message: string) {
        super('[faker-js/faker]: ', + message);
    }
}

Alternative

No response

Additional context

No response

@xDivisionByZerox xDivisionByZerox added the s: pending triage Pending Triage label Mar 28, 2022
@Shinigami92 Shinigami92 added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs and removed s: pending triage Pending Triage labels Mar 28, 2022
@Shinigami92 Shinigami92 moved this to Todo in Faker Roadmap Mar 28, 2022
@xDivisionByZerox xDivisionByZerox moved this from Todo to In Progress in Faker Roadmap Mar 28, 2022
@xDivisionByZerox xDivisionByZerox self-assigned this Mar 28, 2022
@xDivisionByZerox xDivisionByZerox added the needs test More tests are needed label Mar 28, 2022
@xDivisionByZerox xDivisionByZerox added c: feature Request for new feature and removed needs test More tests are needed c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs labels Mar 28, 2022
Repository owner moved this from In Progress to Done in Faker Roadmap Mar 31, 2022
@ST-DDT ST-DDT removed this from Faker Roadmap Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants