From 89ed3867090f15ffd3632041a52c7694b7e576a4 Mon Sep 17 00:00:00 2001 From: Niklas Johansson Date: Mon, 18 Nov 2024 10:40:09 +0100 Subject: [PATCH] fix: Improve error message for invalid node type --- node/router/messages/src/helpers/node_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/router/messages/src/helpers/node_type.rs b/node/router/messages/src/helpers/node_type.rs index 42fbf9bf1e..830068d601 100644 --- a/node/router/messages/src/helpers/node_type.rs +++ b/node/router/messages/src/helpers/node_type.rs @@ -77,7 +77,7 @@ impl FromBytes for NodeType { 0 => Ok(Self::Client), 1 => Ok(Self::Prover), 2 => Ok(Self::Validator), - _ => Err(error("Invalid node type")), + x => Err(error(format!("Invalid node type: expected 0, 1, or 2, got {x}."))), } } }