HI Everyone, I’m using a https outcalls feature of icp canisters to compose a project which fetchs data from external rest api and store it in the canister storage.
Here’s the code I used to fetch data.
match ic_cdk::api::management_canister::http_request::http_request(
ic_cdk::api::management_canister::http_request::CanisterHttpRequestArgument {
url: format!("{}×tamp={}", source_url, get_time_in_milliseconds()),
max_response_bytes: Some(1024 * 10),
method: ic_cdk::api::management_canister::http_request::HttpMethod::GET,
headers: Vec::new(),
body: None,
transform: None,
},
500_000_000,
)
.await
{
Ok((response,)) => todo!(),
Err((code, err)) => {
ic_cdk::println!("Error code {:?}:\n{}", code, err.clone());
todo!()
}
}
I verified that the target url is returning an expected value when hit by using curl command.
However, after deploy this code, I got the following error logs from the canister.
[313347. 2025-01-27T09:50:15.93760109Z]: Error code SysTransient:
No consensus could be reached. Replicas had different responses. Details: request_id: 603885, timeout: 1737971713759708822, hashes: [f9ad42a082510a4375e2f5c149c0c24ec344900a8691e17ab0a7d5839bea947e: 1], [f3df19648bf11a284e3703bf10b52d08e9d5210363ca61134006c4daca0dc729: 1], [d9dc0fb19af9602eae225ec226bc9228a31932312c71dd97d53e55da10c16f20: 1], [9c955112d9b80c4f44f5979ecd9e92fb0106ab34516652a8330d9ed45959c759: 1], [97f63f142f900f24acb4bd2ff42a29a51b65cb594a37a90c68fa5908f5488687: 1], [92281237fc5ac627c99875e271e7cda7d54e25301374abd62b5b5fda200c3d1b: 1], [3c5f4373c29b6077d621fc4350fd8fd039b39b34fc696618a41dda59ab5ed0d3: 1], [0ee79a87eac64d803f4e888daa0ccfcfbc896f1237c3f7ec4166f2b664275f02: 1], [0e99b232ce3f09d9139580b2c76b7e2125428d2bfa93806baf036074274f9a53: 1]
Can you help me to troubleshoot this issue, please?