server/src/common/response/response.code.ts

34 lines
466 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* 响应码枚举首位与HTTP状态码保持一致
*/
export enum ResponseCode {
/**
* 操作成功
*/
SUCESS = 2000,
/**
* 客户端未知错误
*/
ERROR = 4000,
/**
* 令牌错误
*/
TOKEN_ERORR = 4050,
/**
* 登陆过期
*/
TOKEN_EXPIRED = 4051,
/**
* 参数错误
*/
PARAM_ERROR = 4005,
/**
* 服务端未知错误
*/
UNKNOWN_ERROR = 5000,
/**
* 未授权
*/
UNAUTHORIZED = 4001,
}