You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"message": "unsupported operand type(s) for %: 'ValueError' and 'tuple'",
"stack": "Traceback (most recent call last):
File \"/var/task/handle_generate_certificate.py\", line 28, in handle_generate_certificate
raise ValueError(\"test\")
ValueError: test
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File \"/opt/python/sls_sdk/lib/instrumentation/logging.py\", line 56, in __warning
_resolve_message(*args), origin=\"pythonLogging\"
File \"/opt/python/sls_sdk/lib/instrumentation/logging.py\", line 22, in _resolve_message
return args[0] % args[1:]
TypeError: unsupported operand type(s) for %: 'ValueError' and 'tuple'
",
logging.error
,.warning
etc functions let you pass in basically anything. For example, I can pass in an Exception here:The serverless SDK can't handle this:
It works for
logging.error
but not forlogging.warning
. You should probably add a similarisinstance(args[0], BaseException)
check to the _warning function here: https://github.com/serverless/console/blob/main/python/packages/sdk/sls_sdk/lib/instrumentation/logging.py#L45The text was updated successfully, but these errors were encountered: