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

No description for error codes #264

Open
GadiRiversideFM opened this issue Oct 25, 2023 · 3 comments
Open

No description for error codes #264

GadiRiversideFM opened this issue Oct 25, 2023 · 3 comments

Comments

@GadiRiversideFM
Copy link

Is there any docs/description regarding the error msgs that are emitted from the centrifuge instance error event?
for example timeout or transport closed which are very common to see on production logs.
thanks G

@FZambia
Copy link
Member

FZambia commented Nov 3, 2023

Hello,

timeout error happens on operation timeouts. Since network involved this will always happen from time to time.

transport closed error happens when operation tries to be executed - but underlying transport is closed. This will also happen from time to time as network connections are involved.

All error codes listed here:

export enum errorCodes {

The SDK generally survives network issues, reconnects and resubscribes to channels, handles subscription timeouts. But if you get errors upon calling some individual operations like RPC, presence, presence stats, history, publish - then you need to handle retry logic yourself.

@GadiRiversideFM
Copy link
Author

@FZambia timeout means the operation failed and terminated or it's postponed for later?

@FZambia
Copy link
Member

FZambia commented Nov 23, 2023

It means that response to the issued request not received from server in a configured time. centrifuge-js automatically handles tmeouts on initial connection or subscriptions - by reconnecting or resubscribing. For individual operations like publish/presence/rpc - timeout is just an error which is not retried by the SDK.

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

No branches or pull requests

2 participants