Skip to content

Commit 6c4ca2c

Browse files
fix(low-code): handle tab character ScannerError specifically
Per reviewer feedback, update the fix to specifically handle the tab character error case rather than catching all ScannerError exceptions. This maintains the existing pattern of handling specific error cases. Co-Authored-By: unknown <>
1 parent 22e9d85 commit 6c4ca2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ def _parse_yaml_if_possible(value: Any) -> Any:
204204
return yaml.safe_load(value)
205205
except ParserError: # "{{ record[0] in ['cohortActiveUsers'] }}" # not valid YAML
206206
return value
207-
except ScannerError: # "%Y-%m-%d" or strings with tabs - not valid YAML
208-
return value
207+
except ScannerError as e: # "%Y-%m-%d" or strings with tabs - not valid YAML
208+
if "expected alphabetic or numeric character, but found '%'" in str(e):
209+
return value
210+
if "found character '\\t' that cannot start any token" in str(e):
211+
return value
212+
raise e
209213
return value

0 commit comments

Comments
 (0)