Skip to content

Commit

Permalink
fix faulty verification
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 committed Nov 1, 2023
1 parent a9bbdda commit c44641a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/canisters/frontend/ic-certified-assets/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,17 @@ pub fn verify_response(

fn certified_http_request(state: &State, request: HttpRequest) -> HttpResponse {
let response = state.http_request(request.clone(), &[], unused_callback());
let Ok(_) = verify_response(state, &request, &response) else {panic!("Response verification failed: {:#?}", response)};
match verify_response(state, &request, &response) {
Err(err) => panic!(
"Response verification failed with error {:?}. Response: {:#?}",
err, response
),
Ok(success) => {
if !success {
panic!("Response verification failed. Response: {:?}", response)
}
}
}
response
}

Expand Down

0 comments on commit c44641a

Please sign in to comment.