fix(core): remove silent failures

This commit is contained in:
smypmsa
2025-08-05 14:40:43 +00:00
parent ea1d6b469a
commit 49c5085764
+9 -6
View File
@@ -132,8 +132,9 @@ def validate_config(config: dict) -> None:
value = get_nested_value(config, path) value = get_nested_value(config, path)
if value not in valid_values: if value not in valid_values:
raise ValueError(f"{path} must be one of {valid_values}") raise ValueError(f"{path} must be one of {valid_values}")
except ValueError: except ValueError as e:
continue if "Missing required config key" not in str(e):
raise
# Cannot enable both dynamic and fixed priority fees # Cannot enable both dynamic and fixed priority fees
try: try:
@@ -141,8 +142,9 @@ def validate_config(config: dict) -> None:
fixed = get_nested_value(config, "priority_fees.enable_fixed") fixed = get_nested_value(config, "priority_fees.enable_fixed")
if dynamic and fixed: if dynamic and fixed:
raise ValueError("Cannot enable both dynamic and fixed priority fees simultaneously") raise ValueError("Cannot enable both dynamic and fixed priority fees simultaneously")
except ValueError: except ValueError as e:
pass if "Missing required config key" not in str(e):
raise
# Platform-specific validation # Platform-specific validation
platform_str = config.get("platform", "pump_fun") platform_str = config.get("platform", "pump_fun")
@@ -176,8 +178,9 @@ def validate_platform_config(config: dict, platform: Platform) -> None:
f"Listener type '{listener_type}' is not compatible with platform '{platform.value}'. " f"Listener type '{listener_type}' is not compatible with platform '{platform.value}'. "
f"Compatible listeners: {compatible_listeners}" f"Compatible listeners: {compatible_listeners}"
) )
except ValueError: except ValueError as e:
pass if "Missing required config key" not in str(e):
raise
# Platform-specific configuration validation # Platform-specific configuration validation
if platform == Platform.PUMP_FUN: if platform == Platform.PUMP_FUN: