diff --git a/tools/spectral/ipa/rulesets/functions/IPA005ExceptionExtensionFormat.js b/tools/spectral/ipa/rulesets/functions/IPA005ExceptionExtensionFormat.js index bacff02ff4..87aabffd60 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA005ExceptionExtensionFormat.js +++ b/tools/spectral/ipa/rulesets/functions/IPA005ExceptionExtensionFormat.js @@ -29,6 +29,6 @@ function checkViolationsAndReturnErrors(input, path) { }); return errors; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA102CollectionIdentifierCamelCase.js b/tools/spectral/ipa/rulesets/functions/IPA102CollectionIdentifierCamelCase.js index 1a9e1930d8..61d75cd251 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA102CollectionIdentifierCamelCase.js +++ b/tools/spectral/ipa/rulesets/functions/IPA102CollectionIdentifierCamelCase.js @@ -106,7 +106,7 @@ function checkViolations(pathKey, path, ignoredValues = []) { } }); } catch (e) { - handleInternalError(RULE_NAME, [...path, pathKey], e); + return handleInternalError(RULE_NAME, [...path, pathKey], e); } return violations; diff --git a/tools/spectral/ipa/rulesets/functions/IPA102EachPathAlternatesBetweenResourceNameAndPathParam.js b/tools/spectral/ipa/rulesets/functions/IPA102EachPathAlternatesBetweenResourceNameAndPathParam.js index 85891cce38..689620425f 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA102EachPathAlternatesBetweenResourceNameAndPathParam.js +++ b/tools/spectral/ipa/rulesets/functions/IPA102EachPathAlternatesBetweenResourceNameAndPathParam.js @@ -67,6 +67,6 @@ function checkViolationsAndReturnErrors(suffixWithLeadingSlash, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA104EachResourceHasGetMethod.js b/tools/spectral/ipa/rulesets/functions/IPA104EachResourceHasGetMethod.js index f7d6c14a1e..47c0dc87d4 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA104EachResourceHasGetMethod.js +++ b/tools/spectral/ipa/rulesets/functions/IPA104EachResourceHasGetMethod.js @@ -1,9 +1,9 @@ import { - hasGetMethod, - isSingletonResource, getResourcePathItems, + hasGetMethod, isResourceCollectionIdentifier, isSingleResourceIdentifier, + isSingletonResource, } from './utils/resourceEvaluation.js'; import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/collectionUtils.js'; @@ -42,6 +42,6 @@ function checkViolationsAndReturnErrors(oasPaths, input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA104GetMethodReturnsSingleResource.js b/tools/spectral/ipa/rulesets/functions/IPA104GetMethodReturnsSingleResource.js index fa45b36e72..87a60fcfc1 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA104GetMethodReturnsSingleResource.js +++ b/tools/spectral/ipa/rulesets/functions/IPA104GetMethodReturnsSingleResource.js @@ -52,6 +52,6 @@ function checkViolationsAndReturnErrors(contentPerMediaType, path, isSingleton) } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA105ListMethodResponseIsGetMethodResponse.js b/tools/spectral/ipa/rulesets/functions/IPA105ListMethodResponseIsGetMethodResponse.js index cb0a843897..00049f2225 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA105ListMethodResponseIsGetMethodResponse.js +++ b/tools/spectral/ipa/rulesets/functions/IPA105ListMethodResponseIsGetMethodResponse.js @@ -5,7 +5,7 @@ import { } from './utils/resourceEvaluation.js'; import { resolveObject } from './utils/componentUtils.js'; import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/collectionUtils.js'; -import { getSchemaRef, getSchemaNameFromRef, getResponseOfGetMethodByMediaType } from './utils/methodUtils.js'; +import { getResponseOfGetMethodByMediaType, getSchemaNameFromRef, getSchemaRef } from './utils/methodUtils.js'; import { schemaIsPaginated } from './utils/schemaUtils.js'; const RULE_NAME = 'xgen-IPA-105-list-method-response-is-get-method-response'; @@ -93,6 +93,6 @@ function checkViolationsAndReturnErrors(path, listMethodResultItems, getMethodRe } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodResponseIsGetMethodResponse.js b/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodResponseIsGetMethodResponse.js index 8b99933033..5156aed057 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodResponseIsGetMethodResponse.js +++ b/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodResponseIsGetMethodResponse.js @@ -5,7 +5,7 @@ import { } from './utils/resourceEvaluation.js'; import { resolveObject } from './utils/componentUtils.js'; import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/collectionUtils.js'; -import { getSchemaRef, getResponseOfGetMethodByMediaType } from './utils/methodUtils.js'; +import { getResponseOfGetMethodByMediaType, getSchemaRef } from './utils/methodUtils.js'; const RULE_NAME = 'xgen-IPA-106-create-method-response-is-get-method-response'; const ERROR_MESSAGE = @@ -72,6 +72,6 @@ function checkViolationsAndReturnErrors(path, createMethodResponseContent, getMe } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodShouldNotHaveQueryParameters.js b/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodShouldNotHaveQueryParameters.js index 4f15e782db..bb3ca121f8 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodShouldNotHaveQueryParameters.js +++ b/tools/spectral/ipa/rulesets/functions/IPA106CreateMethodShouldNotHaveQueryParameters.js @@ -50,6 +50,6 @@ function checkViolationsAndReturnErrors(postMethodParameters, path, opts) { } return errors; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodMustNotHaveQueryParams.js b/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodMustNotHaveQueryParams.js index 7b5b8cf9cd..ff8859c9d8 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodMustNotHaveQueryParams.js +++ b/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodMustNotHaveQueryParams.js @@ -51,6 +51,6 @@ function checkViolationsAndReturnErrors(postMethodParameters, path, ruleName, op } return errors; } catch (e) { - handleInternalError(ruleName, path, e); + return handleInternalError(ruleName, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodResponseIsGetMethodResponse.js b/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodResponseIsGetMethodResponse.js index 85433662af..d3d33efdba 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodResponseIsGetMethodResponse.js +++ b/tools/spectral/ipa/rulesets/functions/IPA107UpdateMethodResponseIsGetMethodResponse.js @@ -6,7 +6,7 @@ import { } from './utils/resourceEvaluation.js'; import { resolveObject } from './utils/componentUtils.js'; import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/collectionUtils.js'; -import { getSchemaRef, getGETMethodResponseSchemaFromPathItem } from './utils/methodUtils.js'; +import { getGETMethodResponseSchemaFromPathItem, getSchemaRef } from './utils/methodUtils.js'; const RULE_NAME = 'xgen-IPA-107-update-method-response-is-get-method-response'; const ERROR_MESSAGE = @@ -84,6 +84,6 @@ function checkViolationsAndReturnErrors(path, updateMethodResponseContent, getMe } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethod204Response.js b/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethod204Response.js index 082f11c638..b637b0faeb 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethod204Response.js +++ b/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethod204Response.js @@ -37,6 +37,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethodResponseShouldNotHaveSchema.js b/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethodResponseShouldNotHaveSchema.js index ab4b083ebd..8440bcf138 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethodResponseShouldNotHaveSchema.js +++ b/tools/spectral/ipa/rulesets/functions/IPA108DeleteMethodResponseShouldNotHaveSchema.js @@ -41,7 +41,7 @@ function checkViolationsAndReturnErrors(input, jsonPathArray) { } } } catch (e) { - handleInternalError(RULE_NAME, jsonPathArray, e); + return handleInternalError(RULE_NAME, jsonPathArray, e); } return errors; } diff --git a/tools/spectral/ipa/rulesets/functions/IPA109CustomMethodIdentifierFormat.js b/tools/spectral/ipa/rulesets/functions/IPA109CustomMethodIdentifierFormat.js index 5a4de133b0..bbb8414f59 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA109CustomMethodIdentifierFormat.js +++ b/tools/spectral/ipa/rulesets/functions/IPA109CustomMethodIdentifierFormat.js @@ -62,6 +62,6 @@ function checkViolationsAndReturnErrors(pathKey, path) { return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustBeGetOrPost.js b/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustBeGetOrPost.js index c1f3dc4c39..78be0db86b 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustBeGetOrPost.js +++ b/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustBeGetOrPost.js @@ -37,6 +37,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustUseCamelCase.js b/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustUseCamelCase.js index a84d0dd19d..d3e612878f 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustUseCamelCase.js +++ b/tools/spectral/ipa/rulesets/functions/IPA109EachCustomMethodMustUseCamelCase.js @@ -30,6 +30,6 @@ function checkViolationsAndReturnErrors(pathKey, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineLinksArray.js b/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineLinksArray.js index 4ca4265c75..b811731313 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineLinksArray.js +++ b/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineLinksArray.js @@ -44,6 +44,6 @@ function checkViolationsAndReturnErrors(listResponseSchema, oas, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineResultsArray.js b/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineResultsArray.js index 785f7e6445..96228e85ae 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineResultsArray.js +++ b/tools/spectral/ipa/rulesets/functions/IPA110CollectionsResponseDefineResultsArray.js @@ -42,6 +42,6 @@ function checkViolationsAndReturnErrors(listResponseSchema, oas, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA110CollectionsUsePaginatedPrefix.js b/tools/spectral/ipa/rulesets/functions/IPA110CollectionsUsePaginatedPrefix.js index a33fdb88c5..de304333cb 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA110CollectionsUsePaginatedPrefix.js +++ b/tools/spectral/ipa/rulesets/functions/IPA110CollectionsUsePaginatedPrefix.js @@ -61,6 +61,6 @@ function checkViolationsAndReturnErrors(listMethodResponse, oas, path) { return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA112AvoidProjectFieldNames.js b/tools/spectral/ipa/rulesets/functions/IPA112AvoidProjectFieldNames.js index efcfaa479f..9ee3d7a840 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA112AvoidProjectFieldNames.js +++ b/tools/spectral/ipa/rulesets/functions/IPA112AvoidProjectFieldNames.js @@ -47,6 +47,6 @@ function checkViolationsAndReturnErrors(input, options, path) { return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA112BooleanFieldNamesAvoidIsPrefix.js b/tools/spectral/ipa/rulesets/functions/IPA112BooleanFieldNamesAvoidIsPrefix.js index 00b2b67d70..eaf4d91519 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA112BooleanFieldNamesAvoidIsPrefix.js +++ b/tools/spectral/ipa/rulesets/functions/IPA112BooleanFieldNamesAvoidIsPrefix.js @@ -27,6 +27,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA112FieldNamesAreCamelCase.js b/tools/spectral/ipa/rulesets/functions/IPA112FieldNamesAreCamelCase.js index a0a693ab29..c58c222b1d 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA112FieldNamesAreCamelCase.js +++ b/tools/spectral/ipa/rulesets/functions/IPA112FieldNamesAreCamelCase.js @@ -26,6 +26,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoDeleteMethod.js b/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoDeleteMethod.js index 3868a958fb..cb53e132ce 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoDeleteMethod.js +++ b/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoDeleteMethod.js @@ -1,8 +1,8 @@ import { getResourcePathItems, - isSingletonResource, - isResourceCollectionIdentifier, hasDeleteMethod, + isResourceCollectionIdentifier, + isSingletonResource, } from './utils/resourceEvaluation.js'; import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/collectionUtils.js'; @@ -30,6 +30,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoId.js b/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoId.js index 1d62a1cc62..519d7253c8 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoId.js +++ b/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasNoId.js @@ -1,8 +1,8 @@ import { getResourcePathItems, hasGetMethod, - isSingletonResource, isResourceCollectionIdentifier, + isSingletonResource, } from './utils/resourceEvaluation.js'; import { getAllSuccessfulResponseSchemas } from './utils/methodUtils.js'; import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/collectionUtils.js'; @@ -43,6 +43,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasUpdateMethod.js b/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasUpdateMethod.js index cba8c897e5..93a7fd2301 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasUpdateMethod.js +++ b/tools/spectral/ipa/rulesets/functions/IPA113SingletonHasUpdateMethod.js @@ -1,9 +1,9 @@ import { getResourcePathItems, - isSingletonResource, - isResourceCollectionIdentifier, - hasPutMethod, hasPatchMethod, + hasPutMethod, + isResourceCollectionIdentifier, + isSingletonResource, } from './utils/resourceEvaluation.js'; import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/collectionUtils.js'; @@ -31,6 +31,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA114ApiErrorHasBadRequestDetail.js b/tools/spectral/ipa/rulesets/functions/IPA114ApiErrorHasBadRequestDetail.js index 978e0fc8a9..bb6f5c5372 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA114ApiErrorHasBadRequestDetail.js +++ b/tools/spectral/ipa/rulesets/functions/IPA114ApiErrorHasBadRequestDetail.js @@ -58,12 +58,6 @@ function checkViolationsAndReturnErrors(apiErrorSchema, documentInventory, path) return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); - return [ - { - path, - message: `Internal error during validation: ${e.message}`, - }, - ]; + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA114AuthenticatedEndpointsHaveAuthErrors.js b/tools/spectral/ipa/rulesets/functions/IPA114AuthenticatedEndpointsHaveAuthErrors.js index 440296ce4a..dc78d074dc 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA114AuthenticatedEndpointsHaveAuthErrors.js +++ b/tools/spectral/ipa/rulesets/functions/IPA114AuthenticatedEndpointsHaveAuthErrors.js @@ -61,6 +61,6 @@ function checkViolationsAndReturnErrors(responses, path) { return errors; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA114ErrorResponsesReferToApiError.js b/tools/spectral/ipa/rulesets/functions/IPA114ErrorResponsesReferToApiError.js index f55723051a..77b8f12144 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA114ErrorResponsesReferToApiError.js +++ b/tools/spectral/ipa/rulesets/functions/IPA114ErrorResponsesReferToApiError.js @@ -75,6 +75,6 @@ function checkViolationsAndReturnErrors(apiResponseObject, oas, path, errorCode) } return errors; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA114ParameterizedPathsHave404NotFound.js b/tools/spectral/ipa/rulesets/functions/IPA114ParameterizedPathsHave404NotFound.js index 11f0ed674d..8173a9915b 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA114ParameterizedPathsHave404NotFound.js +++ b/tools/spectral/ipa/rulesets/functions/IPA114ParameterizedPathsHave404NotFound.js @@ -52,6 +52,6 @@ function checkViolationsAndReturnErrors(responses, path) { return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionEndsWithPeriod.js b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionEndsWithPeriod.js index b7d80c3d23..b8febf0dc0 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionEndsWithPeriod.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionEndsWithPeriod.js @@ -22,6 +22,6 @@ function checkViolationsAndReturnErrors(description, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionMustNotUseHtml.js b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionMustNotUseHtml.js index 39e4f12931..a5ed79261d 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionMustNotUseHtml.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionMustNotUseHtml.js @@ -32,6 +32,6 @@ function checkViolationsAndReturnErrors(description, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseLinks.js b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseLinks.js index f289657a13..4fa8937435 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseLinks.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseLinks.js @@ -23,6 +23,6 @@ function checkViolationsAndReturnErrors(description, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseTables.js b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseTables.js index 46dc9ac566..aab72f5930 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseTables.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionShouldNotUseTables.js @@ -23,6 +23,6 @@ function checkViolationsAndReturnErrors(description, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionStartsWithUpperCase.js b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionStartsWithUpperCase.js index c6c104928e..9c5573d6e0 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117DescriptionStartsWithUpperCase.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117DescriptionStartsWithUpperCase.js @@ -21,6 +21,6 @@ function checkViolationsAndReturnErrors(description, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117HasDescription.js b/tools/spectral/ipa/rulesets/functions/IPA117HasDescription.js index f08aa23912..7b24c987ba 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117HasDescription.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117HasDescription.js @@ -16,6 +16,6 @@ function checkViolationsAndReturnErrors(input, path) { } return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117ObjectsMustBeWellDefined.js b/tools/spectral/ipa/rulesets/functions/IPA117ObjectsMustBeWellDefined.js index 01d91097fb..a96d8edc1a 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117ObjectsMustBeWellDefined.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117ObjectsMustBeWellDefined.js @@ -62,6 +62,6 @@ function checkViolationsAndReturnErrors(object, path) { } return [{ path, message: ERROR_MESSAGE }]; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117OperationSummaryFormat.js b/tools/spectral/ipa/rulesets/functions/IPA117OperationSummaryFormat.js index a493efa5e4..3356bd2198 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117OperationSummaryFormat.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117OperationSummaryFormat.js @@ -21,6 +21,6 @@ function checkViolationsAndReturnErrors(summary, ignoreList, grammaticalWords, p } return []; } catch (e) { - handleInternalError(ruleName, path, e); + return handleInternalError(ruleName, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117ParameterHasExamplesOrSchema.js b/tools/spectral/ipa/rulesets/functions/IPA117ParameterHasExamplesOrSchema.js index 7ca5d0c4b8..c8e72ee02e 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117ParameterHasExamplesOrSchema.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117ParameterHasExamplesOrSchema.js @@ -15,6 +15,6 @@ function checkViolationsAndReturnErrors(object, path) { } return [{ path, message: ERROR_MESSAGE }]; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA117PlaintextResponseMustHaveExample.js b/tools/spectral/ipa/rulesets/functions/IPA117PlaintextResponseMustHaveExample.js index 6d803ed3c2..76c66668df 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA117PlaintextResponseMustHaveExample.js +++ b/tools/spectral/ipa/rulesets/functions/IPA117PlaintextResponseMustHaveExample.js @@ -45,6 +45,6 @@ function checkViolationsAndReturnErrors(response, path) { } return [{ path, message: ERROR_MESSAGE }]; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA118NoAdditionalPropertiesFalse.js b/tools/spectral/ipa/rulesets/functions/IPA118NoAdditionalPropertiesFalse.js index b590dcb543..89389570a4 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA118NoAdditionalPropertiesFalse.js +++ b/tools/spectral/ipa/rulesets/functions/IPA118NoAdditionalPropertiesFalse.js @@ -33,6 +33,6 @@ function checkViolationsAndReturnErrors(schemaObject, path) { return errors; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA119NoDefaultForCloudProviders.js b/tools/spectral/ipa/rulesets/functions/IPA119NoDefaultForCloudProviders.js index dc76f2b686..42fca6a4ac 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA119NoDefaultForCloudProviders.js +++ b/tools/spectral/ipa/rulesets/functions/IPA119NoDefaultForCloudProviders.js @@ -75,6 +75,6 @@ function checkViolationsAndReturnErrors(propertyObject, path, fieldType) { } return errors; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA123EachEnumValueMustBeUpperSnakeCase.js b/tools/spectral/ipa/rulesets/functions/IPA123EachEnumValueMustBeUpperSnakeCase.js index 25cd8a3dcc..21b175b055 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA123EachEnumValueMustBeUpperSnakeCase.js +++ b/tools/spectral/ipa/rulesets/functions/IPA123EachEnumValueMustBeUpperSnakeCase.js @@ -30,6 +30,6 @@ function checkViolationsAndReturnErrors(input, schemaPath) { }); return errors; } catch (e) { - handleInternalError(RULE_NAME, schemaPath, e); + return handleInternalError(RULE_NAME, schemaPath, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/IPA124ArrayMaxItems.js b/tools/spectral/ipa/rulesets/functions/IPA124ArrayMaxItems.js index a7bcfd308b..78ff73b163 100644 --- a/tools/spectral/ipa/rulesets/functions/IPA124ArrayMaxItems.js +++ b/tools/spectral/ipa/rulesets/functions/IPA124ArrayMaxItems.js @@ -51,6 +51,6 @@ function checkViolationsAndReturnErrors(input, path, maxAllowedValue) { return []; } catch (e) { - handleInternalError(RULE_NAME, path, e); + return handleInternalError(RULE_NAME, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/utils/validations/checkPaginationQueryParameterAndReturnErrors.js b/tools/spectral/ipa/rulesets/functions/utils/validations/checkPaginationQueryParameterAndReturnErrors.js index 67900a9b52..aef35a5ef4 100644 --- a/tools/spectral/ipa/rulesets/functions/utils/validations/checkPaginationQueryParameterAndReturnErrors.js +++ b/tools/spectral/ipa/rulesets/functions/utils/validations/checkPaginationQueryParameterAndReturnErrors.js @@ -65,7 +65,6 @@ export function checkPaginationQueryParameterAndReturnErrors(operation, path, pa return []; } catch (e) { - handleInternalError(ruleName, path, e); - return []; + return handleInternalError(ruleName, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/utils/validations/checkResponseCodeAndReturnErrors.js b/tools/spectral/ipa/rulesets/functions/utils/validations/checkResponseCodeAndReturnErrors.js index 7b9b6a4ad8..cb8df8289e 100644 --- a/tools/spectral/ipa/rulesets/functions/utils/validations/checkResponseCodeAndReturnErrors.js +++ b/tools/spectral/ipa/rulesets/functions/utils/validations/checkResponseCodeAndReturnErrors.js @@ -27,6 +27,6 @@ export function checkResponseCodeAndReturnErrors(operationObject, expectedStatus } return []; } catch (e) { - handleInternalError(ruleName, path, e); + return handleInternalError(ruleName, path, e); } } diff --git a/tools/spectral/ipa/rulesets/functions/utils/validations/checkSchemaRefSuffixAndReturnErrors.js b/tools/spectral/ipa/rulesets/functions/utils/validations/checkSchemaRefSuffixAndReturnErrors.js index 9562130297..23bc9163a7 100644 --- a/tools/spectral/ipa/rulesets/functions/utils/validations/checkSchemaRefSuffixAndReturnErrors.js +++ b/tools/spectral/ipa/rulesets/functions/utils/validations/checkSchemaRefSuffixAndReturnErrors.js @@ -35,6 +35,6 @@ export function checkSchemaRefSuffixAndReturnErrors(path, contentPerMediaType, e } return []; } catch (e) { - handleInternalError(ruleName, path, e); + return handleInternalError(ruleName, path, e); } }