---
# System prepended metadata

title: 探店 Error 定義表

---

# 探店 Error 定義表
```typescript=
export interface IERROR_TYPE {
  errorCode: number;
  errorMessage: string;
  errorDetail: string;
}

export const ERROR_TYPE = {
  /** default */
  INTERNAL_SERVER_ERROR_EXCEPTION: {
    errorCode: 1000,
    errorMessage: 'Internal server error',
    errorDetail: '',
  },
  HTTP_EXCEPTION: {
    errorCode: 1001,
    errorMessage: 'Http default exception',
    errorDetail: '',
  },
  BAD_REQUEST_EXCEPTION: {
    errorCode: 1002,
    errorMessage: 'Bad request, Data validation failed',
    errorDetail: '',
  },
  UNAUTHORIZED_EXCEPTION: {
    errorCode: 1003,
    errorMessage: 'Unauthorized',
    errorDetail: '',
  },
  METHOD_NOT_ALLOWED_EXCEPTION: {
    errorCode: 1004,
    errorMessage: 'Method not allowed',
    errorDetail: '',
  },
  NOT_FOUND_EXCEPTION: {
    errorCode: 1005,
    errorMessage: 'Not found',
    errorDetail: '',
  },
  FORBIDDEN_EXCEPTION: {
    errorCode: 1006,
    errorMessage: 'Forbidden resource',
    errorDetail: '',
  },
  NOT_ACCEPTABLE_EXCEPTION: {
    errorCode: 1007,
    errorMessage: 'Not acceptable',
    errorDetail: '',
  },
  CONFLICT_EXCEPTION: {
    errorCode: 1008,
    errorMessage: 'Conflict',
    errorDetail: '',
  },
  GONE_EXCEPTION: {
    errorCode: 1009,
    errorMessage: 'Gone',
    errorDetail: '',
  },
  PAYLOAD_TOO_LARGE_EXCEPTION: {
    errorCode: 1010,
    errorMessage: 'Payload too large',
    errorDetail: '',
  },
  UNSUPPORTED_MEDIA_TYPE_EXCEPTION: {
    errorCode: 1011,
    errorMessage: 'Unsupported media type',
    errorDetail: '',
  },
  UNPROCESSABLE_ENTITY_EXCEPTION: {
    errorCode: 1012,
    errorMessage: 'Unprocessable entity',
    errorDetail: '',
  },
  NOT_IMPLEMENTED_EXCEPTION: {
    errorCode: 1013,
    errorMessage: 'Not implemented',
    errorDetail: '',
  },
  HTTP_VERSION_NOT_SUPPORTED_EXCEPTION: {
    errorCode: 1014,
    errorMessage: 'Http version not supported',
    errorDetail: '',
  },
  BAD_GATEWAY_EXCEPTION: {
    errorCode: 1015,
    errorMessage: 'Bad gateway',
    errorDetail: '',
  },
  SERVICE_UNAVAILABLE_EXCEPTION: {
    errorCode: 1016,
    errorMessage: 'Service unavailable',
    errorDetail: '',
  },
  GATEWAY_TIMEOUT_EXCEPTION: {
    errorCode: 1017,
    errorMessage: 'Gateway timeout',
    errorDetail: '',
  },
  IM_A_TEAPOT_EXCEPTION: {
    errorCode: 1018,
    errorMessage: "I'm a teapot",
    errorDetail: '',
  },
  PRECONDITION_FAILED_EXCEPTION: {
    errorCode: 1019,
    errorMessage: 'Precondition failed',
    errorDetail: '',
  },
  MISDIRECTED_EXCEPTION: {
    errorCode: 1020,
    errorMessage: 'Misdirected',
    errorDetail: '',
  },

  /** auth 11xx */
  INVALID_ACCESS_TOKEN: {
    errorCode: 1101,
    errorMessage: 'Invalid access token',
    errorDetail: '',
  },
  INVALID_OPEN_API_TOKEN: {
    errorCode: 1102,
    errorMessage: 'Invalid openApi token',
    errorDetail: '',
  },

  /** minio 12xx */
  FILE_NOT_FOUND: {
    errorCode: 1201,
    errorMessage: 'File not found',
    errorDetail: '',
  },
  FILE_TYPE_NOT_SUPPORTED: {
    errorCode: 1202,
    errorMessage: 'File type not supported',
    errorDetail: '',
  },
  UPLOAD_FILE_ERROR: {
    errorCode: 1203,
    errorMessage: 'Upload file failed',
    errorDetail: '',
  },
  DELETE_FILE_ERROR: {
    errorCode: 1204,
    errorMessage: 'Delete file failed',
    errorDetail: '',
  },

  /** user 13xx */
  USER_ALREADY_EXISTS: {
    errorCode: 1301,
    errorMessage: 'User already exists',
    errorDetail: '',
  },
  USER_NOT_FOUND: {
    errorCode: 1302,
    errorMessage: 'User not found',
    errorDetail: '',
  },
  USER_NOT_LOGIN: {
    errorCode: 1303,
    errorMessage: 'User not login',
    errorDetail: '',
  },
  USER_TOKEN_EXPIRE: {
    errorCode: 1304,
    errorMessage: 'Token expire',
    errorDetail: '',
  },
  USER_NO_ROLE_PERMISSION: {
    errorCode: 1305,
    errorMessage: 'User has no role permission to access this route',
    errorDetail: '',
  },
  USER_NO_ACTION_PERMISSION: {
    errorCode: 1306,
    errorMessage: 'User has no action permission to access this route',
    errorDetail: '',
  },
  USER_INFO_NOT_FOUND: {
    errorCode: 1307,
    errorMessage: 'User info not found',
    errorDetail: '',
  },
  USER_CREATE_FAILED: {
    errorCode: 1308,
    errorMessage: 'User create failed, please try again later',
    errorDetail: '',
  },
  USER_EMAIL_NOT_VERIFIED: {
    errorCode: 1309,
    errorMessage: 'User email not verified',
    errorDetail: '',
  },
  USER_EMAIL_ALREADY_ACTIVE: {
    errorCode: 1310,
    errorMessage: 'User email already verified',
    errorDetail: '',
  },
  USER_EMAIL_VERIFY_FAILED: {
    errorCode: 1311,
    errorMessage: 'User email verify failed',
    errorDetail: '',
  },
  USER_EMAIL_VERIFY_HIT_LIMIT: {
    errorCode: 1312,
    errorMessage:
      'User email verification hit max retries, please regenerate verifyCode',
    errorDetail: '',
  },
  USER_REFERRAL_CODE_NOT_FOUND: {
    errorCode: 1313,
    errorMessage: 'Referral code not found',
  },
  USER_ALBUM_NOT_FOUND: {
    errorCode: 1314,
    errorMessage: 'Album not found',
  },

  /** shop 14xx */
  SHOP_ALREADY_EXISTS: {
    errorCode: 1401,
    errorMessage: 'Shop already exists',
    errorDetail: '',
  },
  SHOP_NOT_FOUND: {
    errorCode: 1402,
    errorMessage: 'Shop not found',
    errorDetail: '',
  },
  SHOP_TAGS_HAS_BEEN_USED: {
    errorCode: 1403,
    errorMessage: 'Shop tags already used',
    errorDetail: '',
  },

  /** beacon */
  BEACON_AD_ALREADY_EXISTS: {
    errorCode: 1404,
    errorMessage: 'Beacon ad already exists',
    errorDetail: '',
  },
  BEACON_AD_NOT_FOUND: {
    errorCode: 1405,
    errorMessage: 'Beacon ad not found',
    errorDetail: '',
  },

  /** discount info */
  DISCOUNT_INFO_ALREADY_EXISTS: {
    errorCode: 1406,
    errorMessage: 'DiscountInfo already exists',
    errorDetail: '',
  },
  DISCOUNT_INFO_NOT_FOUND: {
    errorCode: 1407,
    errorMessage: 'DiscountInfo not found',
    errorDetail: '',
  },

  /** official info */
  OFFICIAL_INFO_ALREADY_EXISTS: {
    errorCode: 1406,
    errorMessage: 'OfficialInfo already exists',
    errorDetail: '',
  },
  OFFICIAL_INFO_NOT_FOUND: {
    errorCode: 1407,
    errorMessage: 'OfficialInfo not found',
    errorDetail: '',
  },
};

```