Skip to content

Check if data attribute exists in user in rest password subscription #41

Description

@ir4y
KeyError: 'data'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/dockeruser/.cache/pypoetry/virtualenvs/aidbox-2fa-9TtSrW0h-py3.12/lib/python3.12/site-packages/aidbox_python_sdk/sdk.py", line 106, in handler
    result = await coro_or_result
             ^^^^^^^^^^^^^^^^^^^^
  File "/app/app/aidbox/subscriptions.py", line 18, in user_created
    if user["data"].get("resetPassword", False):
       ~~~~^^^^^^^^
  File "/home/dockeruser/.cache/pypoetry/virtualenvs/aidbox-2fa-9TtSrW0h-py3.12/lib/python3.12/site-packages/fhirpy/base/resource.py", line 25, in __getitem__
    raise AttributeError from e

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions