| 7 | |
| 8 | #[derive(Debug, thiserror::Error)] |
| 9 | pub enum ApiError { |
| 10 | #[error("Session not found: {0}")] |
| 11 | SessionNotFound(String), |
| 12 | |
| 13 | #[error("Not found: {0}")] |
| 14 | NotFound(String), |
| 15 | |
| 16 | #[error("Bad request: {0}")] |
| 17 | BadRequest(String), |
| 18 | |
| 19 | #[error("Provider error: {0}")] |
| 20 | ProviderError(String), |
| 21 | |
| 22 | #[error("Invalid request: {0}")] |
| 23 | InvalidRequest(String), |
| 24 | |
| 25 | #[error("Internal error: {0}")] |
| 26 | InternalError(String), |
| 27 | } |
| 28 | |
| 29 | impl IntoResponse for ApiError { |
| 30 | fn into_response(self) -> Response { |
no outgoing calls
no test coverage detected