(error: WaCustomError)
| 3 | |
| 4 | impl From<WaCustomError> for Status { |
| 5 | fn from(error: WaCustomError) -> Self { |
| 6 | match error { |
| 7 | WaCustomError::InvalidParams => Status::invalid_argument(error.to_string()), |
| 8 | WaCustomError::NotFound(msg) => Status::not_found(msg), |
| 9 | WaCustomError::FsError(msg) => Status::internal(format!("Filesystem error: {}", msg)), |
| 10 | WaCustomError::DatabaseError(msg) => { |
| 11 | Status::internal(format!("Database error: {}", msg)) |
| 12 | } |
| 13 | WaCustomError::SerializationError(msg) => { |
| 14 | Status::internal(format!("Serialization error: {}", msg)) |
| 15 | } |
| 16 | WaCustomError::DeserializationError(msg) => { |
| 17 | Status::internal(format!("Deserialization error: {}", msg)) |
| 18 | } |
| 19 | _ => Status::internal(error.to_string()), |
| 20 | } |
| 21 | } |
| 22 | } |
nothing calls this directly
no outgoing calls
no test coverage detected