Skip to content

Role update fails to send task to worker #189

@frankie567

Description

@frankie567

Faulty code:

send_task(
on_role_updated,
str(role.id),
set(map(str, added_permissions)),
set(map(str, deleted_permissions)),
str(workspace.id),
)

set objects are not encodable by the JSON encoder of Dramatiq.

The error is not catched by unit tests because send_task is fully mocked. This needs to be improved as well so we can catch this kind of errors.

Sentry: https://fief.sentry.io/issues/4182696675/events/b382c75c7647401c9c5c0d4770e124d7/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions