From 3d122f45b4a5692e482ab3dfbebeffa64fbd9c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 2 Feb 2024 17:02:19 +0100 Subject: [PATCH] Add two more error responses likely to be used in the future --- common/ip-packet-requests/src/response.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/ip-packet-requests/src/response.rs b/common/ip-packet-requests/src/response.rs index 83d9deb7ab..29b83f9a5a 100644 --- a/common/ip-packet-requests/src/response.rs +++ b/common/ip-packet-requests/src/response.rs @@ -211,10 +211,17 @@ pub struct ErrorResponse { pub reply: ErrorResponseReply, } -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize, thiserror::Error)] pub enum ErrorResponseReply { + #[error("{msg}")] + Generic { msg: String }, + #[error( + "version mismatch: response is v{request_version} and response is v{response_version}" + )] VersionMismatch { request_version: u8, response_version: u8, }, + #[error("destination failed exit policy filter check")] + ExitPolicyFilterCheckFailed { dst: String }, }