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

chore: export error codes from subpackages #2704

Closed
SgtPooki opened this issue Sep 17, 2024 Discussed in #2669 · 2 comments
Closed

chore: export error codes from subpackages #2704

SgtPooki opened this issue Sep 17, 2024 Discussed in #2669 · 2 comments
Labels
dx Developer Experience effort/hours Estimated to take one or several hours exp/beginner Can be confidently tackled by newcomers good first issue Good issue for new contributors help wanted Seeking public contribution on this issue

Comments

@SgtPooki
Copy link
Member

Discussed in #2669

Originally posted by mkermani144 August 18, 2024
There are numerous error codes available in libp2p package, in packages/libp2p/src/errors.ts. Is there a reason these error code are not exported neither in the interface package, nor in the libp2p package itself?
Currently there is no way to check caught error type against these codes other than duplicating the needed ones inside codebases using libp2p.
I also know that these codes are going to be refactored to error names in the future, but it doesn't make any difference. When the refactor occurs, the names should be exported the same way.

@SgtPooki SgtPooki changed the title feat: export error codes from subpackages chore: export error codes from subpackages Sep 17, 2024
@SgtPooki SgtPooki added help wanted Seeking public contribution on this issue dx Developer Experience good first issue Good issue for new contributors exp/beginner Can be confidently tackled by newcomers effort/hours Estimated to take one or several hours labels Sep 17, 2024
@mkermani144
Copy link

The discussion has two new comments, I think we may close this one as a result.

@wemeetagain
Copy link
Member

Thanks, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer Experience effort/hours Estimated to take one or several hours exp/beginner Can be confidently tackled by newcomers good first issue Good issue for new contributors help wanted Seeking public contribution on this issue
Projects
None yet
Development

No branches or pull requests

3 participants