Skip to content

Commit

Permalink
Warning added for unmapped from_stix fields. (#1729)
Browse files Browse the repository at this point in the history
Signed-off-by: DerekRushton <[email protected]>
  • Loading branch information
DerekRushton authored Aug 29, 2024
1 parent 5acc8e9 commit de7ed6d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ def transform_query(self, data):
unmapped_operator = stripped_parsing.get('unmapped_operator')
if unmapped_stix:
unmapped_stix_collection.extend(unmapped_stix)
self.logger.warn(f"The following STIX fields are not supported : {set(unmapped_stix_collection)} with dialect {self.dialect}. The request will ignore those fields. This can result in results that do not match the request.")
if unmapped_operator:
unmapped_operator_collection.extend(unmapped_operator)
self.logger.warn(f"The following STIX operators are not supported : {set(unmapped_operator_collection)} with dialect {self.dialect}. The request will ignore those fields. This can result in results that do not match the request.")
if antlr_parsing:
translated_queries = self.transform_antlr(data, antlr_parsing)
if isinstance(translated_queries, str):
Expand Down

0 comments on commit de7ed6d

Please sign in to comment.