Skip to content

Failure to send an event causes the client to get an error but the operation still completes successfully #326

Description

@nicolerenee

Describe the bug

If NATS is unavailable during a event hook an error gets returned to the client but the underlying database operation still completes successfully.

To Reproduce
Steps to reproduce the behavior:

  1. Start an API using x/entx event hooks
  2. Stop the NATS server
  3. Send a valid create/update/delete to the API server
  4. You get an error back from the API, but if you check the database you will see the operation did indeed successfully complete.

Expected behavior

The API should roll back the database change when the event fails to send.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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