Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/v1-remote-binding-error-properties.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@cloudflare/vite-plugin": patch
---

Preserve machine-readable error properties from remote bindings

Enable enhanced error serialization on the remote proxy Worker used by Vite plugin v1. Combined with Miniflare 5.20261023.1-beta, remote binding errors retain properties such as `code` and `numericCode` so Worker code can handle them without parsing error messages.
Comment thread
petebacondarwin marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export async function startRemoteProxySession(
cliDisplayName: options.cliDisplayName,
entrypointSource: remoteBindingsWorkerSource,
compatibilityDate: "2025-04-28",
compatibilityFlags: [],
// Keep custom error names and properties (for example Artifacts `code` and
// `numericCode`) when errors cross from the remote binding into this worker.
compatibilityFlags: ["enhanced_error_serialization"],
complianceRegion: options.complianceRegion,
bindings: rawBindings,
auth: getRemoteBindingsAuthHook(
Expand Down
Loading