Skip to content

Commit

Permalink
fix: return 'invalid' instead of throwing when signer country code is…
Browse files Browse the repository at this point in the history
… not found

Signed-off-by: eum602 <[email protected]>
  • Loading branch information
eum602 committed Nov 1, 2023
1 parent e8df06f commit 0c107bd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/services/validator/certificate_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,13 @@ pub async fn verify_base45(

let signer_country_code_option = get_signer_country_code(&payload);
if let None = signer_country_code_option {
let message = "country code not found";
let message = "signer country code not found";
debug!("TRACE_ID: {}, DESCRIPTION ({})", trace_id, message);
return Responses::BadRequest(Json::from(ErrorMessage {
message,
return Responses::Sucess(Json::from(SuccessMessage {
data: HC1ValidationResponseDto {
is_valid: false,
ddcc_core_data_set,
},
trace_id: trace_id.to_string(),
}));
}
Expand Down

0 comments on commit 0c107bd

Please sign in to comment.