MCPcopy Create free account
hub / github.com/acking-you/static_flow / error_response

Function error_response

crates/backend/src/gpt2api_rs.rs:1830–1841  ·  view source on GitHub ↗
(
    status: StatusCode,
    message: impl Into<String>,
)

Source from the content-addressed store, hash-verified

1828}
1829
1830fn 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)]
1844mod tests {

Callers 7

decode_error_responseFunction · 0.70
extract_public_bearerFunction · 0.70
bad_requestFunction · 0.70
bad_gatewayFunction · 0.70
not_foundFunction · 0.70
conflict_errorFunction · 0.70
internal_errorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected