INNER CODE UNIT · Rust
from
zly2006/zhihu-plus-plus · aigc-vote-server/src/lib.rs:232
fn from(value: sqlx::Error) -> Self {
Self::internal(value.to_string())
}
}
impl IntoResponse for ServiceError {
fn into_response(self) -> Response {
(
self.status,
Json(serde_json::json!({
"error": self.message,
})),
)
.into_response()
}
}
pub fn app(state: AppState) -> Router {