UNPKG

@microsoft/omnichannel-chat-sdk

Version:
18 lines 950 B
"use strict"; /** * Utility function that are only meant to be used internally. It would not guarantee backward compatibility if they were used outside of the package. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.isCoreServicesOrgUrlDNSError = void 0; var AxiosErrorCodes_1 = require("../core/AxiosErrorCodes"); var isCoreServicesOrgUrlDNSError = function (error, coreServicesOrgUrl, dynamicsLocationCode) { // Validating whether it's an 'ERR_NAME_NOT_RESOLVED' error // `ERR_NETWORK` could return false positives since the error can be caused by network disconnection var isDNSUrlResolveError = error.isAxiosError && error.code == AxiosErrorCodes_1.default.ERR_NETWORK; if (isDNSUrlResolveError && coreServicesOrgUrl && dynamicsLocationCode) { return true; } return false; }; exports.isCoreServicesOrgUrlDNSError = isCoreServicesOrgUrlDNSError; //# sourceMappingURL=internalUtils.js.map