You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- failedToResolveSubscriptionPointBecauseChannelSerialNotDefined: renamed since `channelSerial` checked first. Introduced error code used in JS - 102_110;
- failedToResolveSubscriptionPointBecauseChannelFailedToAttach: changed error code to 102_112 (roomInInvalidState), JS doesn't throw anything and just waits for channel attach event. Proposed spec for throwing an error with 102_112 code;
- noItemInResponse: changed error code to 404 and proposed spec for that;
- failedToGetPaginatedResult: renamed and added full error info taken from realtime, JS also throws error with values from realtime. Am not sure what to do with `badRequest` here, probably it's fine to leave it (or `internalServerError` maybe?);
- headersValueJSONDecodingError and jsonValueDecodingError are JSON parser errors and probably should stay with `badRequest`.
Removed unused `MessagesError` enum.
Proposed specs: ably/specification#401
Copy file name to clipboardExpand all lines: Sources/AblyChat/InternalError.swift
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -87,25 +87,19 @@ internal enum InternalError {
87
87
/// Error code is `badRequest` (this is our own error, which is not specified by the spec).
88
88
case failedToResolveSubscriptionPointBecauseMessagesInstanceGone
89
89
90
-
/// Unable to fetch `historyBeforeSubscribe` because a channel in the `ATTACHED` state has violated our expectations by its `attachSerial` not being populated, so we cannot resolve its "subscription point" per CHA-M5b.
91
-
///
92
-
/// Error code is `badRequest` (this is not specified by the spec, which does not make it explicit that the SDK should throw an error in this scenario).
93
-
case failedToResolveSubscriptionPointBecauseAttachSerialNotDefined
90
+
/// Unable to fetch `historyBeforeSubscribe` because a channel in the `ATTACHED` state has violated our expectations by its `channelSerial` or `attachSerial` not being populated, so we cannot resolve its "subscription point" per CHA-M5b.
91
+
case failedToResolveSubscriptionPointBecauseChannelSerialNotDefined
94
92
95
93
/// Unable to fetch `historyBeforeSubscribe` because whilst waiting for a channel to become attached per CHA-M5b in order to resolve its "subscription point".
96
-
///
97
-
/// Error code is `badRequest` (this is not specified by the spec, which does not make it explicit that the SDK should throw an error in this scenario).
98
94
case failedToResolveSubscriptionPointBecauseChannelFailedToAttach(cause:ErrorInfo?)
99
95
100
96
/// Attempted to load a resource from the given `path`, expecting to get a single item back, but the returned `PaginatedResult` is empty.
101
-
///
102
-
/// Error code is `badRequest` (this is not specified by the spec, which does not make it explicit that the SDK should throw an error in this scenario).
103
97
case noItemInResponse(path:String)
104
98
105
99
/// An ably-cocoa `ARTHTTPPaginatedResponse` was received with the given non-200 status code.
106
100
///
107
101
/// Error code is `badRequest` (this is not specified by the spec, which does not make it explicit that the SDK should throw an error in this scenario).
108
-
casepaginatedResultStatusCode(Int)
102
+
casefailedToGetPaginatedResult(cause:ErrorInfo?)
109
103
110
104
// Failed to decode a `HeadersValue` from a `JSONValue`.
// TODO: We've had this check since the start of the codebase, but it's not specified anywhere; rectify this in https://github.com/ably/ably-chat-swift/issues/453
0 commit comments