MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / MakeError

Function MakeError

Source/URLab/Public/Bridge/OpHelpers.h:25–33  ·  view source on GitHub ↗

Build a standard error reply. Single source of truth for the * `{"op": "error", "code": ..., "message": ...}` shape. */

Source from the content-addressed store, hash-verified

23/** Build a standard error reply. Single source of truth for the
24 * `{"op": "error", "code": ..., "message": ...}` shape. */
25inline TSharedPtr<FJsonObject> MakeError(const FString& Code,
26 const FString& Message)
27{
28 TSharedPtr<FJsonObject> Reply = MakeShared<FJsonObject>();
29 Reply->SetStringField(TEXT("op"), TEXT("error"));
30 Reply->SetStringField(TEXT("code"), Code);
31 Reply->SetStringField(TEXT("message"), Message);
32 return Reply;
33}
34
35/** Read the target-actor key from the request envelope. Wire
36 * format: `{"target": "<key>", "target_by": "actor_id" |

Callers 15

MakeJsonErrorFunction · 0.85
RunOnGameThreadSyncFunction · 0.85
ProcessRequestBytesMethod · 0.85
DispatchInternalMethod · 0.85
HandleSetPausedMethod · 0.85
HandleStepMethod · 0.85
HandleResetMethod · 0.85
HandleForwardMethod · 0.85
HandleSetModeMethod · 0.85
HandleSetSimOptionsMethod · 0.85
HandleSetSimSpeedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected