add diagnostic string to DecodeFailed

This commit is contained in:
Ken Sedgwick
2025-02-20 11:13:32 -08:00
parent d82d7fd00d
commit d39b2706e0
3 changed files with 6 additions and 5 deletions

View File

@@ -130,13 +130,13 @@ impl<'a> RelayMessage<'a> {
} else if booly == "false" {
false
} else {
return Err(Error::DecodeFailed);
return Err(Error::DecodeFailed("bad boolean value".into()));
};
return Ok(Self::ok(event_id, status, "fixme"));
}
Err(Error::DecodeFailed)
Err(Error::DecodeFailed("unrecognized message type".into()))
}
}