mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-06-26 22:00:13 +00:00
fix: don't break on IndexError in logging (#9068)
* fix: don't break on IndexError in logging * add reno * Update releasenotes/notes/fix-logging-index-error-c58691db633542c5.yaml --------- Co-authored-by: David S. Batista <dsbatista@gmail.com>
This commit is contained in:
parent
9fbfa9676f
commit
9a046ed431
@ -192,7 +192,7 @@ def patch_make_records_to_use_kwarg_string_interpolation(original_make_records:
|
||||
safe_extra = extra or {}
|
||||
try:
|
||||
interpolated_msg = msg.format(**safe_extra)
|
||||
except (KeyError, ValueError):
|
||||
except (KeyError, ValueError, IndexError):
|
||||
interpolated_msg = msg
|
||||
return original_make_records(name, level, fn, lno, interpolated_msg, (), exc_info, func, extra, sinfo)
|
||||
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an index error in the logging module when arbitrary strings are logged.
|
Loading…
x
Reference in New Issue
Block a user