DRF 异常常用 的 类

  • NotFound 未找到 状态信息:404 Not Found
    PermissionDenied 权限拒绝 状态信息:403 Forbidden
    ParseError 解析错误 状态信息:400 Bad Request
    AuthenticationFailed 认证失败 状态信息:403 Forbidden
    NotAuthenticated 尚未认证 状态信息:403 Forbidden
    MethodNotAllowed 请求方式不支持 状态信息:405 Method Not Allowed
    Throttled 超过限流次数 状态信息:500 Internal Server Error
    ValidationError 校验失败 状态信息:400 Bad Request
    NotAcceptable 要获取的数据格式不支持 状态信息:406 Not Acceptable
    分类: django
原文地址:https://www.cnblogs.com/yy19981110/p/13887396.html