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
let retry = |m:&str| retryable_transport_error(&anyhow::anyhow!("{m}"));
90
+
assert!(!retry(
91
+
"Composio direct request failed with HTTP 400 Bad Request: upstream said HTTP 503"
92
+
));
93
+
assert!(!retry(
94
+
"Composio proxy request failed with HTTP 401 Unauthorized: retry after HTTP 429"
95
+
));
96
+
// The real ones still classify.
97
+
assert!(retry(
98
+
"Composio direct request failed with HTTP 429 Too Many Requests: slow down"
99
+
));
100
+
}
101
+
102
+
/// Composio's structured error names the problem and how to fix it. This is the
103
+
/// payload from the report, verbatim.
104
+
#[test]
105
+
fna_structured_error_body_reaches_the_message(){
106
+
let body = r#"{"error":{"message":"Connected account user ID does not match the provided user ID.","code":1812,"slug":"ActionExecute_ConnectedAccountEntityIdMismatch","status":400,"suggested_fix":"The connected_account_id you provided belongs to a different entity."}}"#;
107
+
let message = describe_failure("direct", reqwest::StatusCode::BAD_REQUEST, body);
108
+
109
+
assert!(
110
+
message.starts_with("Composio direct request failed with HTTP 400"),
111
+
"the status clause must stay first and verbatim: {message}"
112
+
);
113
+
assert!(message.contains("Connected account user ID does not match"));
0 commit comments