-
-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Labels
sdkIssues related to @eventcatalog/sdk packageIssues related to @eventcatalog/sdk package
Description
Migrated from event-catalog/sdk#94
I tried this:
When attempting to add an event to a channel using the SDK, an error is thrown if a "newer" version of the event already exists. However, adding the "same" version multiple times works without issue.
It appears to be a dedicated check enforcing this restriction, but it is unclear why this should be the case. Upon investigation, it seems that this behavior might be caused by a race condition in the following code:
await rmMessageById(directory)(_message.id, _message.version, true);
await writeMessage(pathToResource)(message);
This happened:
An error was thrown when trying to add the newer version.
However, adding the same version multiple times worked without issue.
I expected this:
Adding a older version of an event should be possible without errors.
EventCatalog Version
1.4.8
Node.js Version
No response
Platform(s)
No response
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
sdkIssues related to @eventcatalog/sdk packageIssues related to @eventcatalog/sdk package