Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .repository-projection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"projection": "deixic-code",
"projectionSchemaVersion": 1,
"sourceRepository": "dx-corp/mono",
"sourceSha": "88ef98b3d93dba59a200f3868a57cac885499ab1",
"sourceSha": "b0731bfb2dc7809af04ad53f53a46651af0caf4a",
"destinationRepository": "dx-corp/code",
"priorProjectedBase": "6003ab990cf3e1f66b428ade5abd592e3a7970be",
"priorProjectedBase": "70f2c3440504bf3f89878cc8d6ea41c2b445551b",
"definitionDigest": "93eb3fb9be07d3644538c5519cf38973b4246cdcf2f8d7b60ccd593d7ca73033",
"toolDigest": "5a30b31c7f35befc8be0e48bd91bdd65167ce110fbc393702b4ad9ac7defe7d7",
"contentDigest": "fb6a7f815f5fad6ef9751c13cb50c488088f0e6c44e1f278298d822d8a76a0c9",
"contentDigest": "c36e2c408355ab5427f50c4cb256a2cf695dfed6ac6f3835f10b89f62d1daf74",
"publicationEligible": true
}
15 changes: 14 additions & 1 deletion vendor/dex-loop/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,11 @@ impl ErrorClass {
/// Explicit wire-code boundary; human-readable details are never classified.
pub fn of_gateway_code(code: &str) -> Self {
match code {
"context_length_exceeded" | "context_capacity" => Self::ContextCapacity,
// Governance refused the request's size or surface count; the
// same request is refused on every route, a shorter one is not.
"context_length_exceeded" | "context_capacity" | "governance_input_too_large" => {
Self::ContextCapacity
}
"rate_limit_error"
| "rate_limit_exceeded"
| "resource_exhausted"
Expand All @@ -483,6 +487,7 @@ impl ErrorClass {
"authentication_error" | "unauthorized" => Self::Auth,
"invalid_request"
| "invalid_request_error"
| "governance_input_rejected"
| "bad_request"
| "permission_error"
| "forbidden"
Expand Down Expand Up @@ -1434,5 +1439,13 @@ mod tests {
ErrorClass::of_gateway_code("rate_limit_error"),
ErrorClass::RateLimited
);
assert_eq!(
ErrorClass::of_gateway_code("governance_input_too_large"),
ErrorClass::ContextCapacity
);
assert_eq!(
ErrorClass::of_gateway_code("governance_input_rejected"),
ErrorClass::Rejected
);
}
}
Loading