Skip to content

AttributeError: 'str' object has no attribute 'get' - wrapper.py #295

Closed
@bissli82

Description

@bissli82

Expected Behavior

Hi all,@joeyzhao2018 , I'm getting a few error messages coming from the wrapper.py,
It comes as info and not as an error, that's my guess to why it was missed for awhile.
I assume this is because our lambda function returns as string and not an object(json?) which the extension expect so self.response is an str.

I think the issue was introduced by this PR

image

Actual Behavior

Steps to Reproduce the Problem

As far as I can see, any lambda run which returns a string

Specifications

  • Datadog Lambda Layer version: 35
  • Python version: 3.9

Stacktrace

File "/opt/python/lib/python3.9/site-packages/datadog_lambda/wrapper.py", line 281, in _after
and self.response.get("principalId")
AttributeError: 'str' object has no attribute 'get'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions