summaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
authorPaul Woolcock <paul@woolcock.us>2019-03-08 06:23:09 -0500
committerPaul Woolcock <paul@woolcock.us>2019-03-09 07:24:19 -0500
commit7786a83a14e4c93098c3ddec7fc03b07807d325c (patch)
treec67deb0f8fa0e0b3ea65374ec24460ed0c80498e /src/errors.rs
parent6dfaac00c1209fba1276e9573a337d03bdc61760 (diff)
Add `min_id` to pagination params
also switches to using serde_qs instead of manually serializing the query string
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs
index c98e810..04f7c90 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -5,6 +5,7 @@ use envy::Error as EnvyError;
use hyper_old_types::Error as HeaderParseError;
use reqwest::{header::ToStrError as HeaderStrError, Error as HttpError, StatusCode};
use serde_json::Error as SerdeError;
+use serde_qs::Error as SerdeQsError;
use serde_urlencoded::ser::Error as UrlEncodedError;
#[cfg(feature = "toml")]
use tomlcrate::de::Error as TomlDeError;
@@ -57,6 +58,8 @@ pub enum Error {
#[cfg(feature = "env")]
/// Error deserializing from the environment
Envy(EnvyError),
+ /// Error serializing to a query string
+ SerdeQs(SerdeQsError),
/// Other errors
Other(String),
}
@@ -96,6 +99,7 @@ impl error::Error for Error {
Error::HeaderParseError(ref e) => e.description(),
#[cfg(feature = "env")]
Error::Envy(ref e) => e.description(),
+ Error::SerdeQs(ref e) => e.description(),
Error::Other(ref e) => e,
}
}
@@ -136,6 +140,7 @@ from! {
HeaderStrError, HeaderStrError,
HeaderParseError, HeaderParseError,
#[cfg(feature = "env")] EnvyError, Envy,
+ SerdeQsError, SerdeQs,
String, Other,
}