I'm getting an error executing my function. I'm not able to replicate this locally since I have to use a mock context. Is there a way to debug this kind of error?
Traceback (most recent call last):
File "/usr/local/server/src/server.py", line 166, in handler
return await action(logger, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/server/src/server.py", line 125, in action
output["body"] = output.get("body", "")
^^^^^^^^^^
AttributeError: 'Context' object has no attribute 'get'
TL;DR
Developers are facing an 'AttributeError' with a 'Context' object. They are unable to replicate it locally due to using a mock context. The error occurs because the 'get' attribute is missing from the 'Context' object. To debug this, check the context object being passed to ensure it has the 'get' method and handle the attribute appropriately.