fix(errors): export error helpers and types from package entry point - #1864
Tyagiquamar wants to merge 2 commits into
Conversation
…etStream#1848) Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
szuperaz
left a comment
There was a problem hiding this comment.
Thanks for the PR, exporting error helpers makes sense. However adding tests that assert something is exported from the client is not something we do, can you please revert the new test?
Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
|
Reverted the export assertions test as requested. The PR now only includes the error helper/type exports in src/index.ts. |
|
@Tyagiquamar what is that you are missing from the errors.ts file? I believe the contents were not exported on purpose. |
|
The main missing pieces are The use case is an app-level retry policy: consumers can fail fast on non-retryable API errors and retry things like rate limits/timeouts using the retryability information the SDK already maintains. Currently these helpers exist in |
szuperaz
left a comment
There was a problem hiding this comment.
Looks good to me now, lets also wait for @MartinCupela's review
|
It looks like the list of |
Thanks, that makes sense. I'll leave this open for now so we can revisit the public exports once your |
|
I have asked for a review by the BE team. The issue is that such a list can get our of sync pretty fast, so there is discussion, whether we could do better. If not, I will provide reviewed updated list and export it. |
Fixes #1848
Summary
\�rrors.ts\ defines key error helpers, types, and error code mappings (\isAPIError, \isErrorRetryable, \APIErrorCodes, \isConnectionIDError, \isWSFailure, \isErrorResponse, \APIError), but they were not exported from the package entry point (\src/index.ts).
Changes