diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-13 13:10:04 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-13 13:10:04 +0000 |
| commit | 412494edf618b8eda71656855656f9b8b21c3eae (patch) | |
| tree | 72ddf711989eadd23b47471123c982d75a761e87 /src/errors.rs | |
| parent | 987e5d92ea9043b588cb7887861bb05a3a0695c4 (diff) | |
Delete an uploaded file
Diffstat (limited to 'src/errors.rs')
| -rw-r--r-- | src/errors.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs index e6f8e2c..15ca9d4 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -68,3 +68,10 @@ impl From<std::string::String> for AppError { AppError::BadRequest(error) } } + +/// Raise a generic io error +impl From<std::io::Error> for AppError { + fn from(error: std::io::Error) -> Self { + AppError::BadRequest(error.to_string()) + } +} |
