TsgcWSPClient_WAMPEvents › OnCallError

OnCallError Event

Fires when a remote procedure invoked by Call fails on the server or is rejected.

Syntax

property OnCallError: TsgcWSCallErrorEvent;
// TsgcWSCallErrorEvent = procedure(Connection: TsgcWSConnection; CallId, ErrorURI, ErrorDesc, ErrorDetails: string) of object

Default Value

Remarks

Delivered in response to a WAMP CALLERROR frame (type id 4). The CallId matches the id passed to Call so the handler can look up the originating request. ErrorURI is the canonical error identifier (for example http://example.com/error#invalid_argument), ErrorDesc is a human-readable message, and ErrorDetails is an optional JSON payload with structured diagnostic data. Either OnCallResult, OnCallError or a cancellation error is guaranteed to fire exactly once for every Call.

Example


procedure TForm1.WAMPCallError(Connection: TsgcWSConnection;
  CallId, ErrorURI, ErrorDesc, ErrorDetails: string);
begin
  Memo1.Lines.Add(Format('call %s failed: %s - %s',
    [CallId, ErrorURI, ErrorDesc]));
end;

Back to Events