Skip to content
Open
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
6 changes: 5 additions & 1 deletion dotnet/src/Canvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public static LocalRpcInvocationException HandlerError(string message) => Build(
"canvas_handler_error",
message);

public static LocalRpcInvocationException ToRpcException(CanvasError error) => Build(error.Code, error.Message);
// Code is prefixed into the message because RemoteRpcException does not currently
// surface the JSON-RPC error.data payload to callers, so the structured code (e.g.
// "canvas_action_no_handler") would otherwise be unobservable on the receiving side.
// TODO: plumb error.data through RemoteRpcException and drop the prefix here.
public static LocalRpcInvocationException ToRpcException(CanvasError error) => Build(error.Code, $"{error.Code}: {error.Message}");

private static LocalRpcInvocationException Build(string code, string message)
{
Expand Down
345 changes: 143 additions & 202 deletions dotnet/test/E2E/CanvasE2ETests.cs

Large diffs are not rendered by default.

Loading
Loading