Skip to content

Fix missing await in RxRestClient methods causing errors to be swallowed#386

Merged
pubkey merged 2 commits intomasterfrom
claude/fix-rest-endpoints-bug-E6JSE
Apr 7, 2026
Merged

Fix missing await in RxRestClient methods causing errors to be swallowed#386
pubkey merged 2 commits intomasterfrom
claude/fix-rest-endpoints-bug-E6JSE

Conversation

@pubkey
Copy link
Copy Markdown
Owner

@pubkey pubkey commented Apr 4, 2026

This PR contains:

  • A BUGFIX
  • IMPROVED TESTS

Describe the problem you have without this PR

The RxRestClient.get(), RxRestClient.set(), and RxRestClient.delete() methods were not awaiting the postRequest() call before passing the result to handleError(). This caused server errors (such as 403 Forbidden responses from changeValidator rejecting writes) to be silently swallowed instead of being thrown to the caller.

Changes

Source Code

  • Made RxRestClient.get(), RxRestClient.set(), and RxRestClient.delete() properly async by adding await to the postRequest() calls
  • This ensures that promise rejections from the server are properly propagated to the caller via handleError()

Tests

  • Updated existing tests in /set and /delete endpoints to expect errors to be thrown when changeValidator rejects writes
  • Added two new test cases:
    • should throw an error via handleError when the server rejects a set - verifies that client.set() throws when the server rejects the operation
    • should throw an error via handleError when the server rejects a delete - verifies that client.delete() throws when the server rejects the operation

Todos

  • Tests
  • Changelog

@pubkey

https://claude.ai/code/session_01XFhhWHka2ZDVQ8udCF3vLN

claude and others added 2 commits April 4, 2026 10:18
The postRequest() call was not awaited before calling handleError(),
causing server errors (e.g. 403 Forbidden) to be silently swallowed
instead of properly thrown to the caller.

https://claude.ai/code/session_01XFhhWHka2ZDVQ8udCF3vLN
@pubkey pubkey merged commit e59c822 into master Apr 7, 2026
2 checks passed
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