Skip to content

Conversation

@arein
Copy link
Member

@arein arein commented Oct 28, 2025

Creating a release? Please use the Release PR Template instead.

Description

Please include a brief summary of the change.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Draft PR (breaking/non-breaking change which needs more work for having a proper functionality [Mark this PR as ready to review only when completely ready])
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

Only unut tests.

Fixes/Resolves (Optional)

https://linear.app/reown/issue/WK-947/js-sdk-is-retrying-non-retryable-errors

Use this table template to show examples of your changes:

Before After
Content Cell Content Cell
Content Cell Content Cell

Checklist

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Additional Information (Optional)

Please include any additional information that may be useful for the reviewer.

arein and others added 2 commits October 28, 2025 12:06
The SDK was retrying all relay errors indefinitely, including
unrecoverable errors like JWT validation failures (error code 3000).

Changes:
- Add isRetryableRelayError() utility to classify errors by code
- Update Publisher to check error retryability before queuing retries
- Update Subscriber to fail fast on non-retryable errors
- Add comprehensive unit tests for error classification

Non-retryable error ranges:
- 1000-1999: Invalid request errors
- 3000-3999: Authentication/Authorization errors (JWT, expired tokens)
- 5000-5999: User rejection errors

Fixes retry loops on permanent failures while maintaining retry
behavior for transient network issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@arein arein requested a review from ganchoradkov October 28, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants