Skip to content

Throw error if no invite has been removed when it should #29

@maxceem

Description

@maxceem

When we send a Kafka message to update or delete invite, in both cases we delete invite from the ES index as per logic here https://github.com/topcoder-platform/project-processor-es/blob/develop/src/services/ProcessorServiceProjectMemberInvite.js#L57-L63

At the moment if no invite has been found and removed handlers to update or delete still return success.

Instead of this, if no invite has been found and removed, the handlers should throw an error:
Invite with email "{email}" and userId "{userId}" is not found and not removed.

Create a 2 unit tests that would test this case, one for update handler and one for delete handler.

Metadata

Metadata

Assignees

No one assigned

    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