UNPKG

@sp-api-sdk/auth

Version:
17 lines (16 loc) 664 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SellingPartnerApiAuthError = void 0; const axios_1 = require("axios"); class SellingPartnerApiAuthError extends axios_1.AxiosError { innerMessage; constructor(error) { const message = error.response ? `access-token error: Response code ${error.response.status}` : `access-token error: No response`; super(message, error.code, error.config, error.request, error.response); this.innerMessage = error.message; this.name = this.constructor.name; } } exports.SellingPartnerApiAuthError = SellingPartnerApiAuthError;