Skip to content

Commit f929fa3

Browse files
committed
refactor: use exhaustive matching in errors
1 parent 811b845 commit f929fa3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

apps/ibc-attestor/src/error.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ impl From<AttestorError> for Status {
6767
AttestorError::SignerError(_) | AttestorError::SignerInitError(_) => {
6868
Self::new(Code::Internal, value.to_string())
6969
}
70-
_ => Self::new(Code::Internal, value.to_string()),
70+
AttestorError::MalformedCommitmentError(_) => {
71+
Self::new(Code::InvalidArgument, value.to_string())
72+
}
73+
AttestorError::AbiError(_) | AttestorError::AdapterError(_) => {
74+
Self::new(Code::Internal, value.to_string())
75+
}
7176
}
7277
}
7378
}

0 commit comments

Comments
 (0)