Skip to content

Improve error messages for channel attach when realtime is not active #594

@tiholic

Description

@tiholic

Steps to reproduce:

realtime.connect();
//wait for it... wait for it...
realtime.disconnect();
//wait for it... wait for it...
realtime.attach();

This gives the follow error log

Error trying to attach to channel: ErrorInfo message=Connection closed by client code=10000 statusCode=200 href=https://help.ably.io/error/10000

However, I noticed that ably-cocoa gives much more intuitive error:

2020-07-22 00:33:17.134239+0530 Runner[68127:3381242] DEBUG: (ARTRealtimeChannel.m:1193) RT:0x600001d6c4b0 C:0x600001924680 (test-channel) can't attach when not in an active state
2020-07-22 00:33:17.147149+0530 Runner[68127:3381445] flutter: Unable to attach to channel: ErrorInfo message=Can't attach when not in an active state code=null statusCode=900 href=null

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improved functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions