fix(gateway): make WriteEngine + converter raise-safe against malformed write commands
This commit is contained in:
@@ -25,6 +25,8 @@ def to_typed_value(raw, data_type: str):
|
||||
data_type: 'boolean' | 'int' | 'float' | 'double' | 'string'.
|
||||
Raises ConversionError on any invalid input (never a bare TypeError).
|
||||
"""
|
||||
if not isinstance(data_type, str):
|
||||
raise ConversionError(f'data_type must be a string, got {type(data_type).__name__}')
|
||||
dtype = data_type.strip().lower()
|
||||
try:
|
||||
if dtype in ('bool', 'boolean'):
|
||||
|
||||
Reference in New Issue
Block a user