Skip to content

Commit e133ff8

Browse files
author
Bryan Sieber
committed
Exception modification
1 parent 49e0ab7 commit e133ff8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jbi/configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def validate_action_yaml_jbi_naming(yaml_action_key, action_dict):
6262
f"CONFIG ERROR: `{yaml_action_key}` setup, but expected '{wb_tag}'"
6363
"(from the `parameters.whiteboard_tag` field)."
6464
)
65-
except AttributeError as exception:
66-
raise ConfigError("CONFIG ERROR: Incorrectly setup") from exception
65+
except (TypeError, AttributeError) as exception:
66+
raise ConfigError("CONFIG ERROR: Action is not properly setup.") from exception
6767

6868

6969
def validate_action_yaml_module(action_dict: Dict[str, Any]):
@@ -80,5 +80,5 @@ def validate_action_yaml_module(action_dict: Dict[str, Any]):
8080
signature(action_module.init).bind(**action_parameters) # type: ignore
8181
except ImportError as exception:
8282
raise ConfigError(f"CONFIG ERROR: Unknown action `{action}`.") from exception
83-
except TypeError as exception:
83+
except (TypeError, AttributeError) as exception:
8484
raise ConfigError("CONFIG ERROR: Action is not properly setup.") from exception

0 commit comments

Comments
 (0)