From c9cd068ba566f60712ea57f7a5310ababf153f82 Mon Sep 17 00:00:00 2001 From: Jeremy Cloarec Date: Fri, 29 Nov 2024 12:33:15 +0100 Subject: [PATCH] [backend] add doc code in error --- .../opencti-graphql/src/modules/indicator/indicator-domain.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/opencti-platform/opencti-graphql/src/modules/indicator/indicator-domain.ts b/opencti-platform/opencti-graphql/src/modules/indicator/indicator-domain.ts index 0ca9bc3a7745..ac7c69a934c4 100644 --- a/opencti-platform/opencti-graphql/src/modules/indicator/indicator-domain.ts +++ b/opencti-platform/opencti-graphql/src/modules/indicator/indicator-domain.ts @@ -229,6 +229,7 @@ const validateIndicatorPattern = async (context: AuthContext, user: AuthUser, pa const exclusionListCheck = await checkObservableValue(observableValues[i]); if (exclusionListCheck) { throw FunctionalError(`Indicator of type ${patternType} is contained in exclusion list.`, { + doc_code: 'INDICATOR_FORMAT_EXCLUDED', excludedValue: exclusionListCheck.value, exclusionList: exclusionListCheck.listId });