(&self)
| 33 | } |
| 34 | |
| 35 | fn status_code(&self) -> StatusCode { |
| 36 | match self { |
| 37 | Self::CollectionNotFound => StatusCode::NOT_FOUND, |
| 38 | Self::InvalidVersionHash => StatusCode::BAD_REQUEST, |
| 39 | Self::UpdateFailed(_) => StatusCode::BAD_REQUEST, |
| 40 | Self::DatabaseError(_) => StatusCode::INTERNAL_SERVER_ERROR, |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | impl From<WaCustomError> for VersionError { |