1use super::reflect::FieldId;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("Message type is not in registry: {0}")]
6 NotInRegistry(String),
7
8 #[error("Field doesn't exist: {0}")]
9 NoSuchField(FieldId),
10
11 #[error("Invalid field type")]
12 InvalidFieldType,
13
14 #[error("Field type not supported")]
15 NotSupported,
16
17 #[error("Protobuf error: {0}")]
18 StepanProtobuf(#[from] protobuf::Error),
19
20 #[error("Protobuf encode error: {0}")]
21 ProstEncodeError(#[from] prost::EncodeError),
22
23 #[error("Protobuf decode error: {0}")]
24 ProstDecodeError(#[from] prost::DecodeError),
25
26 #[error("Error: {0}")]
27 Other(anyhow::Error),
28}