Skip to content

Commit 52e743c

Browse files
authored
fix(rivetkit): decode bridge errors with actor: null (#5056)
Fixes RVT-6296
1 parent fe3ec94 commit 52e743c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • rivetkit-typescript/packages/rivetkit/src/actor

rivetkit-typescript/packages/rivetkit/src/actor/errors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export function decodeBridgeRivetErrorPayload(
237237
if (!isRivetErrorLike(payload)) {
238238
return undefined;
239239
}
240-
if (payload.actor !== undefined && !isActorSpecifier(payload.actor)) {
240+
if (payload.actor !== undefined && payload.actor !== null && !isActorSpecifier(payload.actor)) {
241241
return undefined;
242242
}
243243

@@ -257,7 +257,7 @@ export function decodeBridgeRivetError(value: string): RivetError | undefined {
257257
metadata: payload.metadata,
258258
public: payload.public,
259259
statusCode: payload.statusCode,
260-
actor: payload.actor,
260+
actor: payload.actor ?? undefined,
261261
});
262262
}
263263

0 commit comments

Comments
 (0)