You've already forked AstralRinth
forked from didirus/AstralRinth
Improve error handling (#33)
* refactor: improve error handling * fix: specify bind address instead of port * fix: remove temporary testing file * fix(errors): change error names to snake_case * refactor(errors): split indexing error types, remove unused errors * feat: add env variable checking at program start This just checks whether the enviroment variables exist and can parse to the given type and gives a warning if they can't. This should prevent cases where the program fails at runtime due to checking an environment variable that doesn't exist.
This commit is contained in:
@@ -18,10 +18,8 @@ pub use delete::DeleteFileData;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum FileHostingError {
|
||||
#[error("Error while accessing the data from remote")]
|
||||
RemoteWebsiteError(#[from] reqwest::Error),
|
||||
#[error("Error while serializing or deserializing JSON")]
|
||||
SerDeError(#[from] serde_json::Error),
|
||||
#[error("Error while accessing the data from backblaze")]
|
||||
BackblazeError(#[from] reqwest::Error),
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user