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:
- Start an API using x/entx event hooks
- Stop the NATS server
- Send a valid create/update/delete to the API server
- 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.
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:
Expected behavior
The API should roll back the database change when the event fails to send.