UNPKG

@zowe/cics-for-zowe-sdk

Version:
49 lines 1.89 kB
"use strict"; /** * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v2.0 which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v20.html * * SPDX-License-Identifier: EPL-2.0 * * Copyright Contributors to the Zowe Project. * */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CicsCmciRestError = void 0; const imperative_1 = require("@zowe/imperative"); const constants_1 = require("../constants"); class CicsCmciRestError extends imperative_1.ImperativeError { resultSummary; errors; records; RESPONSE_1; RESPONSE_2; RESPONSE_1_ALT; RESPONSE_2_ALT; FEEDBACKRESP; FEEDBACKRESP_2; FEEDBACK_ACTION; EIBFN_ALT; FEEDBACKRESP_ALT; constructor(msg, response) { super({ msg }); this.resultSummary = response.response.resultsummary; this.errors = response.response.errors; this.records = response.response.records; this.parseResultSummary(); } parseResultSummary() { this.RESPONSE_1 = parseInt(this.resultSummary.api_response1); this.RESPONSE_2 = parseInt(this.resultSummary.api_response2); this.RESPONSE_1_ALT = this.resultSummary.api_response1_alt; this.RESPONSE_2_ALT = this.resultSummary.api_response2_alt; this.FEEDBACKRESP = parseInt(this.errors?.feedback?.resp || constants_1.CicsCmciConstants.DEFAULT_RESP_CODE); this.FEEDBACKRESP_2 = parseInt(this.errors?.feedback?.resp2 || constants_1.CicsCmciConstants.DEFAULT_RESP_CODE); this.FEEDBACK_ACTION = this.errors?.feedback?.action; this.FEEDBACKRESP_ALT = this.errors?.feedback?.resp_alt; this.EIBFN_ALT = this.errors?.feedback?.eibfn_alt; } } exports.CicsCmciRestError = CicsCmciRestError; //# sourceMappingURL=CicsCmciRestError.js.map