mirror of
https://github.com/wisdgod/cursor-api.git
synced 2025-10-06 07:06:51 +08:00
v0.1.3-rc.3
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user