#![warn(missing_docs)]
use thiserror::Error;
#[derive(Debug, Error)]
pub enum DbError {
#[error("An error occurred while connecting to the database: {0}")]
ConnectError(String),
#[error("An error occurred while inserting an object into the database: {0}")]
InsertError(String),
#[error("An error occurred during a SELECT query: {0}")]
SelectError(String),
}
#[derive(Error, Debug)]
pub enum Error {
#[error("An error occurred while gathering common configuration: {0}")]
ConfigError(String),
#[error(
"An error occurred while retrieving the congress.gov API key from the environment: {0}"
)]
CongressGovApiKeyError(String),
#[error("An error occurred while performing an HTTP GET request to the congress.gov API: {0}")]
CongressGovHttpGetError(String),
#[error("An error occurred while reading the HTTP response body: {0}")]
CongressGovResponseError(String),
#[error("Failed to split a name string: {0}")]
NameSplitError(String),
}