chore: export error codes from subpackages #2704
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
Discussed in #2669
Originally posted by mkermani144 August 18, 2024
There are numerous error codes available in
libp2p
package, inpackages/libp2p/src/errors.ts
. Is there a reason these error code are not exported neither in theinterface
package, nor in thelibp2p
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.
The text was updated successfully, but these errors were encountered: