shz.core.msg.ClientFailure Maven / Gradle / Ivy
package shz.core.msg;
public enum ClientFailure implements ClientFailureMsg {
BAD_REQUEST(400, "错误请求"),
UNAUTHORIZED(401, "身份未认证"),
PAYMENT_REQUIRED(402, "保留"),
FORBIDDEN(403, "未授权"),
NOT_FOUND(404, "未找到"),
BAD_METHOD(405, "方法未允许"),
NOT_ACCEPTABLE(406, "无法访问"),
PROXY_AUTH(407, "代理服务器认证要求"),
CLIENT_TIMEOUT(408, "请求超时"),
CONFLICT(409, "请求冲突"),
GONE(410, "资源已经不存在"),
LENGTH_REQUIRED(411, "缺少Content-Length"),
PRECON_FAILED(412, "请求信息先决条件错误"),
ENTITY_TOO_LARGE(413, "请求实体过大"),
REQ_TOO_LONG(414, "请求URI过长"),
UNSUPPORTED_TYPE(415, "不支持的媒体格式"),
RANG_NOT_SATISFIABLE(416, "请求范围无法满足"),
EXPECTATION_FAILED(417, "期望失败"),
TOO_MANY_CONNECTIONS(421, "连接数过多"),
UNPROCESSABLE_ENTITY(422, "语义错误"),
LOCKED(423, "当前资源被锁定"),
FAILED_DEPENDENCY(424, "请求失败"),
UPGRADE_REQUIRED(426, "客户端应当切换到TLS/1.0"),
TOO_MANY_REQUESTS(429, "请求频繁,请稍后再试"),
RETRY_WITH(449, "进行重试"),
;
private final int code;
private final String msg;
ClientFailure(int code, String msg) {
this.code = code;
this.msg = msg;
}
@Override
public int code() {
return code;
}
@Override
public String msg() {
return msg;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy