Skip to content

Commit

Permalink
Merge pull request #215 from ably/mmb-44-error-codes
Browse files Browse the repository at this point in the history
[MMB-44] Assign error code range for spaces
  • Loading branch information
lmars authored Sep 5, 2023
2 parents 36a945d + 81e9c86 commit f6af309
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
25 changes: 17 additions & 8 deletions protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,26 @@ Codes in [errors.json](errors.json) fall into these ranges:
| 80000 | connection-related |
| 90000 | channel-related |

Codes from `100000` are defined outside of scope of this repository.
In other words, these higher ranges are reserved for use by specific Ably projects and ecosystems, where these codes are unknown to the core Ably service:
Codes above `100000` are reserved for use by specific Ably projects and ecosystems, where these codes are unknown to the core Ably service. Definitions for these ranges are defined below.

| From | To | Project / Ecosystem | Location of Definitions |
| ---- | -- | ------------------- | ----------------------- |
| 100000 | 100999 | Asset Tracking | [Specification: Error codes](https://github.com/ably/ably-asset-tracking-common/tree/main/specification#error-codes) |
#### Asset Tracking

The table above is our canonical location for:
Codes for Asset Tracking are maintained externally.

- specifying these ranges
- delegating the definitions of codes that sit within these ranges to elsewhere
| From | To | Location of Definitions |
| ---- | -- | ----------------------- |
| 100000 | 100999 | [Specification: Error codes](https://github.com/ably/ably-asset-tracking-common/tree/main/specification#error-codes) |

#### Spaces

| From | Title |
| ----- | ----- |
| 101000 | Space name missing |
| 101001 | Not entered space |
| 101002 | Lock request exists |
| 101003 | Lock is locked |
| 101004 | Lock invalidated |
| 101005 | Lock released |

## Agents

Expand Down
9 changes: 8 additions & 1 deletion protocol/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,12 @@
"91003": "unable to enter presence channel (maximum member limit exceeded)",
"91004": "unable to automatically re-enter presence channel",
"91005": "presence state is out of sync",
"91100": "member implicitly left presence channel (connection closed)"
"91100": "member implicitly left presence channel (connection closed)",

"101000": "must have a non-empty name for the space",
"101001": "must enter a space to perform this operation",
"101002": "lock request already exists",
"101003": "lock is currently locked",
"101004": "lock was invalidated by a concurrent lock request which now holds the lock",
"101005": "lock was released"
}
9 changes: 8 additions & 1 deletion protocol/errorsHelp.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,12 @@
"91000": "https://faqs.ably.com/error-code-91000",
"91001": "https://faqs.ably.com/error-code-91001",
"91003": "https://faqs.ably.com/error-91003-maximum-member-limit-exceeded",
"91005": "https://faqs.ably.com/error-code-91005"
"91005": "https://faqs.ably.com/error-code-91005",

"101000": "https://faqs.ably.com/error-code-101000",
"101001": "https://faqs.ably.com/error-code-101001",
"101002": "https://faqs.ably.com/error-code-101002",
"101003": "https://faqs.ably.com/error-code-101003",
"101004": "https://faqs.ably.com/error-code-101004",
"101004": "https://faqs.ably.com/error-code-101005"
}

0 comments on commit f6af309

Please sign in to comment.