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

Fix / revert fetch TypeError handling #415

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Fix / revert fetch TypeError handling #415

merged 4 commits into from
Oct 25, 2024

Conversation

parfeon
Copy link
Contributor

@parfeon parfeon commented Oct 25, 2024

fix(subscribe): fix / revert fetch TypeError handling

Revert fix created to handle browser timeouts (not gracefully). The Web Fetch API doesn't have descriptive error information, and it sends TypeError for both cases when connection closed by browser or network issue (blocked domain).

Closes

Revert fix created to handle browser timeouts (not gracefully). The Web Fetch API doesn't have
descriptive error information, and it sends `TypeError` for both cases when connection closed
by browser or network issue (blocked domain).
@parfeon parfeon added status: done This issue is considered resolved. priority: high This PR should be reviewed ASAP. type: fix This PR contains fixes to existing features. labels Oct 25, 2024
@parfeon parfeon self-assigned this Oct 25, 2024
@@ -58,9 +58,7 @@ export class PubNubAPIError extends Error {
category = StatusCategory.PNNetworkIssuesCategory;
message = 'Network issues';
} else if (errorName === 'TypeError') {
if (message.indexOf('Load failed') !== -1 || message.indexOf('Failed to fetch') != -1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! for this issue

@parfeon
Copy link
Contributor Author

parfeon commented Oct 25, 2024

@pubnub-release-bot release

@parfeon parfeon merged commit c47f202 into master Oct 25, 2024
6 checks passed
@parfeon parfeon deleted the CLEN-2319 branch October 25, 2024 08:51
@pubnub-release-bot
Copy link
Contributor

🚀 Release successfully completed 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high This PR should be reviewed ASAP. status: done This issue is considered resolved. type: fix This PR contains fixes to existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants