UNPKG

@crowdin/crowdin-api-client

Version:
10 lines (9 loc) 501 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toHttpClientError = void 0; const axios_1 = require("axios"); const fetchClientError_1 = require("./internal/fetch/fetchClientError"); const toHttpClientError = (error) => error instanceof axios_1.AxiosError || error instanceof fetchClientError_1.FetchClientJsonPayloadError || error instanceof Error ? error : new Error(`unknown http client error: ${error}`); exports.toHttpClientError = toHttpClientError;