UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

43 lines 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getInfo = void 0; const dictionary_1 = require("../dictionary"); function getInfo(errorObj) { let { type: { message, reasons, types }, } = errorObj; message = message !== null && message !== void 0 ? message : ''; reasons = reasons !== null && reasons !== void 0 ? reasons : []; types = types !== null && types !== void 0 ? types : []; const messageList = [message, ...reasons, ...types]; return { errorList, messageList, }; } exports.getInfo = getInfo; const errorList = [ { regex: /.* Cannot apply .* operation to types .* and .*/, value: dictionary_1.ERROR_LIST.unknownToken, }, { regex: /.* document doesn't have a value .* Use .*size\(\)==0 to check if a document is missing a field.*/, value: dictionary_1.ERROR_LIST.nulls, }, { regex: /string_index_out_of_bounds_exception/, value: dictionary_1.ERROR_LIST.outOfRange, }, { regex: /cannot resolve symbol .*/, value: dictionary_1.ERROR_LIST.unknownToken, }, { regex: /Invalid int constant .*/, value: dictionary_1.ERROR_LIST.invalidCastNumber, }, { regex: /null_pointer_exception/, value: dictionary_1.ERROR_LIST.nulls, }, ]; //# sourceMappingURL=elasticsearch.js.map