v0.1.3-rc.3

This commit is contained in:
wisdgod
2025-01-02 19:14:29 +08:00
parent d1a246a5a7
commit c709f9bfc7
34 changed files with 1599 additions and 1389 deletions

View File

@@ -126,9 +126,9 @@ pub struct Error {
}
impl ErrorResponse {
pub fn to_json(&self) -> serde_json::Value {
serde_json::to_value(self).unwrap()
}
// pub fn to_json(&self) -> serde_json::Value {
// serde_json::to_value(self).unwrap()
// }
pub fn status_code(&self) -> StatusCode {
StatusCode::from_u16(self.status).unwrap_or(StatusCode::INTERNAL_SERVER_ERROR)