Skip to content

Commit 6ce7d4a

Browse files
committed
fix: [stix2 import] Replaced undefined methods with actual error message handling
1 parent a76212a commit 6ce7d4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

misp_stix_converter/stix2misp/stix2_to_misp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,14 @@ def _handle_object(self, object_type: str, object_ref: str):
399399
except ObjectTypeLoadingError as error:
400400
self._object_type_loading_error(error)
401401
except UndefinedIndicatorError as error:
402-
self._undefined_indicator_error(error)
402+
self._add_error(f'Undefined Indicator error: {error}')
403403
except UndefinedSTIXObjectError as object_id:
404404
self._add_error(
405405
'Unable to define the object identified '
406406
f'with the id {object_id}'
407407
)
408408
except UndefinedObservableError as error:
409-
self._undefined_observable_error(error)
409+
self._add_error(f'Undefined Observable error: {error}')
410410
except UnknownAttributeTypeError as attribute_type:
411411
self._add_warning(
412412
f'MISP attribute type not mapped: {attribute_type}'

0 commit comments

Comments
 (0)