#[non_exhaustive]pub enum Code {
Show 30 variants
BadRequest = 0,
ValidationFailed = 1,
Unauthenticated = 2,
SessionExpired = 3,
MissingPermission = 4,
PolicyDenied = 5,
NotProvisioned = 6,
ActAsPersonForbidden = 7,
ProviderIsK2 = 8,
QuotaExceeded = 9,
NotFound = 10,
MethodNotAllowed = 11,
Conflict = 12,
IdempotencyConflict = 13,
ResyncRequired = 14,
TooLarge = 15,
InvalidState = 16,
RateLimited = 17,
Internal = 18,
Unavailable = 19,
RangeNotSatisfiable = 20,
StorageFull = 21,
MeetingEnded = 22,
TooEarly = 23,
LinkInvalid = 24,
MeetingLocked = 25,
LobbyFull = 26,
KnockBlocked = 27,
CursorExpired = 28,
Unknown = 65_535,
}Expand description
A stable machine error code. lower_snake; the HTTP status comes from Code::status.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadRequest = 0
400: the request is malformed.
ValidationFailed = 1
400: a field failed validation; details.field names it.
Unauthenticated = 2
401: no or unknown credentials.
SessionExpired = 3
401: the session expired.
MissingPermission = 4
403: a permission bit is missing.
PolicyDenied = 5
403: an org policy forbids this.
NotProvisioned = 6
403: a valid pass for a principal with no Sew account.
ActAsPersonForbidden = 7
403: act-as targeted a person; only agents can be acted as.
ProviderIsK2 = 8
403: the command is off on a K2-provided install.
QuotaExceeded = 9
403: a quota or count limit is reached.
NotFound = 10
404: missing, or hidden from the caller (masked).
MethodNotAllowed = 11
405: only GET reads and POST mutations exist.
Conflict = 12
409: conflicts with current state.
IdempotencyConflict = 13
409: an Idempotency-Key was reused with a different body.
ResyncRequired = 14
410: the cursor is behind the change-log floor; details.floor says where.
TooLarge = 15
413: the body or a field is too large.
InvalidState = 16
422: valid request, but the target’s state forbids it.
RateLimited = 17
429: rate limited; details.retry_after_ms says when to retry.
Internal = 18
500: a server bug.
503: temporarily unavailable.
RangeNotSatisfiable = 20
416: the byte range is outside the file; Content-Range: bytes */<size>.
StorageFull = 21
507: the server’s file storage is below its free-space floor.
MeetingEnded = 22
410: the meeting has ended or was cancelled (also a voice join in its channel).
TooEarly = 23
425: too early: the meeting opens at details.opens_at (also a voice join
before starts_at − 15 min).
LinkInvalid = 24
404: a meeting link that is unknown, has a wrong secret, was revoked or rotated, or whose meeting ended or was cancelled (one body for all four).
MeetingLocked = 25
423: the meeting is locked.
LobbyFull = 26
429: the meeting’s lobby or room is full (max_waiting, max_guests_inside;
nothing was written).
KnockBlocked = 27
403: this join nonce (or member) was turned away twice within 10 minutes and may not knock on this meeting for an hour.
CursorExpired = 28
410: the feed’s cursor is behind the pruned part of the log (the person
notification feed); details.oldest_seq says where to resume.
Unknown = 65_535
A value this build does not know, sent by a newer peer. The server never sends it.
Its discriminant is always
UNKNOWN_DISCRIMINANT.
Implementations§
Trait Implementations§
impl Copy for Code
Source§impl<'de> Deserialize<'de> for Code
impl<'de> Deserialize<'de> for Code
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Code
Source§impl JsonSchema for Code
impl JsonSchema for Code
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more