Skip to content

使用endpoint的错误返回中,无法看到某个字段错误 #1186

@xum001

Description

@xum001
Image 在使用Catcher的时候 ```rust pub fn create_service() -> Service{ Service::new(route_oapi()).catcher(Catcher::default().hoop(handle404)) } ```

其错误返回字段近包含错误,为定位到具体位置
ResBody::Error(StatusError { code: 400, name: "Bad Request", brief: "parse http data failed.", detail: None, cause: Some(SerdeJson(Error("expected , or }", line: 2, column: 12))), origin: None })
希望能增加错误返回内容的错误原因,例如我的id字段不匹配,长度超过了限制什么要求等内容
类似于 id字段应为u32,实际为string,不符合输入值要求限制

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions