UNPKG

@larksuiteoapi/api

Version:
38 lines 1.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AccessTokenObtainErr = exports.throwAppTicketIsEmptyErr = exports.AppTicketIsEmptyErr = exports.throwUserAccessTokenKeyIsEmptyErr = exports.throwTenantKeyIsEmptyErr = exports.throwHelpDeskAuthorizationIsEmptyErr = exports.throwAccessTokenTypeIsInValidErr = void 0; exports.throwAccessTokenTypeIsInValidErr = () => { throw new Error("access token type invalid"); }; exports.throwHelpDeskAuthorizationIsEmptyErr = () => { throw new Error("help desk API, please set the helpdesk information of AppSettings"); }; exports.throwTenantKeyIsEmptyErr = () => { throw new Error("tenant key is empty"); }; exports.throwUserAccessTokenKeyIsEmptyErr = () => { throw new Error("user access token is empty"); }; class AppTicketIsEmptyErr extends Error { constructor() { super(...arguments); this.name = "AppTicketIsEmptyErr"; this.message = "app ticket is empty"; } } exports.AppTicketIsEmptyErr = AppTicketIsEmptyErr; exports.throwAppTicketIsEmptyErr = () => { throw new AppTicketIsEmptyErr(); }; class AccessTokenObtainErr extends Error { constructor(message, response) { super(message); this.name = "AccessTokenObtainErr"; this.response = response; this.code = response.code; this.msg = response.msg; this.error = response.error; } } exports.AccessTokenObtainErr = AccessTokenObtainErr; //# sourceMappingURL=errors.js.map