(
status: StatusCode,
message: impl Into<String>,
)
| 1828 | } |
| 1829 | |
| 1830 | fn error_response( |
| 1831 | status: StatusCode, |
| 1832 | message: impl Into<String>, |
| 1833 | ) -> (StatusCode, Json<ErrorResponse>) { |
| 1834 | ( |
| 1835 | status, |
| 1836 | Json(ErrorResponse { |
| 1837 | error: message.into(), |
| 1838 | code: status.as_u16(), |
| 1839 | }), |
| 1840 | ) |
| 1841 | } |
| 1842 | |
| 1843 | #[cfg(test)] |
| 1844 | mod tests { |
no outgoing calls
no test coverage detected