mirror of
https://github.com/actualbudget/actual.git
synced 2026-07-10 21:54:25 -05:00
[PR #6942] [MERGED] Update send function to propagate any errors and fix catchErrors to return the error in result when an unknown command/method is sent to the browser server
#89019
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/actualbudget/actual/pull/6942
Author: @joel-jeremy
Created: 2/11/2026
Status: ✅ Merged
Merged: 2/13/2026
Merged by: @joel-jeremy
Base:
master← Head:fix-send-catchErrors📝 Commits (4)
5e310efFix send not returning error when catchErrors option is enabled and an unknown method error is encountered49ee32dAdd release notes for PR #69422452d4cFix send to properly propagate errors from the server955af44Update release note📊 Changes
7 files changed (+95 additions, -29 deletions)
View changed files
📝
packages/loot-core/src/platform/client/fetch/__mocks__/index.ts(+1 -1)📝
packages/loot-core/src/platform/client/fetch/index-types.ts(+33 -0)📝
packages/loot-core/src/platform/client/fetch/index.browser.ts(+8 -6)📝
packages/loot-core/src/platform/client/fetch/index.ts(+8 -6)📝
packages/loot-core/src/platform/server/connection/index.electron.ts(+19 -8)📝
packages/loot-core/src/platform/server/connection/index.ts(+20 -8)➕
upcoming-release-notes/6942.md(+6 -0)📄 Description
When an unknown command/method is sent to the browser server via
send, the error is not returned to the client even though thecatchErrorsoption is enabled. This fixes that.This PR also updates the
sendfunction to properly propagate errors from the server handlers. This gives chance for the callers to handle the errors accordingly via standard try/catch (await) orPromise.catch:At the moment, any errors are swallowed and the
sendpromise is not even resolved or rejected if an error occurred:Bundle Stats
View detailed bundle stats
desktop-client
Total
Changeset
home/runner/work/actual/actual/packages/loot-core/src/platform/client/fetch/index.browser.tsView detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
Smaller
No assets were smaller
Unchanged
loot-core
Total
Changeset
home/runner/work/actual/actual/packages/loot-core/src/platform/server/connection/index.tsView detailed bundle breakdown
Added
Removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
No assets were unchanged
api
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.