Skip to content

fix: include actual error message in replaceable event rejection responses#711

Open
Priyanshubhartistm wants to merge 1 commit into
cameri:mainfrom
Priyanshubhartistm:fix/replaceable-event-error-message-empty
Open

fix: include actual error message in replaceable event rejection responses#711
Priyanshubhartistm wants to merge 1 commit into
cameri:mainfrom
Priyanshubhartistm:fix/replaceable-event-error-message-empty

Conversation

@Priyanshubhartistm

Copy link
Copy Markdown
Collaborator

Description

ReplaceableEventStrategy.execute() sent clients a hardcoded error: command result (trailing space, no message) whenever eventRepository.upsert() rejected for any reason other than a duplicate event id constraint violation. The caught error.message was never included in the response. The command result now includes error.message, e.g. error: connection refused.

Related Issue

#710

Motivation and Context

Clients receiving ["OK", "<id>", false, "error: "] have no actionable information about why their event was rejected, which makes debugging relay-side failures (DB outages, connection issues, etc.) unnecessarily difficult for client authors and relay operators.

How Has This Been Tested?

  • pnpm run test:unit — 1483 passing.
  • pnpm run test:cli — 73 passing.
  • pnpm run cover:unit — passing.
  • pnpm run docker:test:integration — 99 scenarios / 489 steps passing.
  • pnpm run lint, pnpm run check:deps, pnpm run build:check, pnpm run build,
    pnpm run verify:cli:build all pass.

Screenshots (if appropriate):

N/A — backend WebSocket message content change only.

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1cf5ded

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 68.708%. remained the same — Priyanshubhartistm:fix/replaceable-event-error-message-empty into cameri:main

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.

2 participants