#[derive(Debug, thiserror::Error)]
pub enum RequestError {
#[error("Invalid UTF-8: {0}")]
InvalidUtf8(#[from] core::str::Utf8Error),
#[error("Invalid JSON: {0}")]
InvalidJson(#[from] serde_json::Error),
#[error("Id is too large, limit of 80 bytes. Got: {0}")]
IdTooLarge(usize),
#[error("Method is not a valid JSON string.")]
InvalidMethod,
#[error("Method is too large, limit of 80 bytes. Got: {0}")]
MethodTooLarge(usize),
}