mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 12:15:40 +08:00
fix: add zero-padded formatting for error code (#627)
This commit is contained in:
@ -48,7 +48,7 @@ impl<'a> From<&'a ApiErrorResponse> for ErrorResponse<'a> {
|
||||
let error_info = value.get_internal_error();
|
||||
let error_type = value.error_type();
|
||||
Self {
|
||||
code: format!("{}_{}", error_info.sub_code, error_info.error_identifier),
|
||||
code: format!("{}_{:02}", error_info.sub_code, error_info.error_identifier),
|
||||
message: Cow::Borrowed(value.get_internal_error().error_message.as_str()),
|
||||
error_type,
|
||||
extra: &error_info.extra,
|
||||
|
||||
Reference in New Issue
Block a user