MCPcopy Create free account
hub / github.com/AI45Lab/Code / server_500_is_generic_anyhow

Function server_500_is_generic_anyhow

core/src/workspace/remote_git.rs:1349–1359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1347
1348 #[tokio::test]
1349 async fn server_500_is_generic_anyhow() {
1350 let (server, backend) = server_and_backend().await;
1351 Mock::given(method("POST"))
1352 .and(path("/v1/repos/test/git/status"))
1353 .respond_with(ResponseTemplate::new(500).set_body_string("boom"))
1354 .mount(&server)
1355 .await;
1356
1357 let err = backend.status().await.unwrap_err();
1358 assert!(err.to_string().contains("server error"), "msg: {}", err);
1359 }
1360
1361 #[tokio::test]
1362 async fn non_json_error_body_falls_back_to_http_code() {

Callers

nothing calls this directly

Calls 2

server_and_backendFunction · 0.85
statusMethod · 0.45

Tested by

no test coverage detected