simplify handling of ical-related errors

This commit is contained in:
Lennart K
2026-01-16 14:16:22 +01:00
parent 2c67890343
commit 63373ad525
7 changed files with 22 additions and 62 deletions

View File

@@ -75,7 +75,8 @@ impl Error {
Self::XmlDecodeError(_) => StatusCode::BAD_REQUEST,
Self::ChronoParseError(_) | Self::NotImplemented => StatusCode::INTERNAL_SERVER_ERROR,
Self::NotFound => StatusCode::NOT_FOUND,
Self::IcalError(err) => err.status_code(),
// TODO: Can also be Bad Request, if it's used input
Self::IcalError(_err) => StatusCode::INTERNAL_SERVER_ERROR,
Self::PreconditionFailed(_err) => StatusCode::PRECONDITION_FAILED,
}
}