Skip to content

Propagate ReplaceEvent errors from RelayWrapper.Publish#67

Merged
mattn merged 1 commit into
fiatjaf:masterfrom
mattn:bugfix/relaywrapper-replace-errors
Jun 17, 2026
Merged

Propagate ReplaceEvent errors from RelayWrapper.Publish#67
mattn merged 1 commit into
fiatjaf:masterfrom
mattn:bugfix/relaywrapper-replace-errors

Conversation

@mattn

@mattn mattn commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

RelayWrapper.Publish discarded the error returned by Store.ReplaceEvent for replaceable/addressable events, silently swallowing failures and returning nil even when the replace failed.

This wraps and returns the error (matching the existing failed to save / failed to query style), so callers actually learn when a replace fails.

A test (TestPublishReturnsReplaceEventErrors) covers the new behavior with a stub store whose ReplaceEvent always errors.

@mattn mattn merged commit 57e3a7a into fiatjaf:master Jun 17, 2026
1 check passed
@mattn mattn deleted the bugfix/relaywrapper-replace-errors branch June 17, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant