Skip to content

Commit d2ff6fa

Browse files
test log
1 parent c2eb288 commit d2ff6fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/spectral/ipa/rulesets/functions/IPA114ErrorResponsesReferToApiError.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const RULE_NAME = 'xgen-IPA-114-error-responses-refer-to-api-error';
1818
* @param {object} context - The context object containing path and document information
1919
*/
2020
export default (input, _, { path, documentInventory }) => {
21+
try {
2122
const oas = documentInventory.unresolved;
2223
const apiResponseObject = resolveObject(oas, path);
2324
const errorCode = path[path.length - 1];
@@ -34,6 +35,11 @@ export default (input, _, { path, documentInventory }) => {
3435
}
3536

3637
collectAdoption(path, RULE_NAME);
38+
} catch(e) {
39+
handleInternalError(RULE_NAME, path, e);
40+
console.log(e);
41+
}
42+
3743
};
3844

3945
function checkViolationsAndReturnErrors(apiResponseObject, oas, path, errorCode) {

0 commit comments

Comments
 (0)