TsgcSSEClient › Events › OnError
Fires when a connection attempt or the stream fails.
property OnError: TsgcSSEErrorEvent;
// TsgcSSEErrorEvent = procedure(Sender: TObject; const aError: string) of object
—
Fires with a description of the failure. After a network error or a read timeout the client reconnects. When the server answers with an HTTP status other than 200 and 204, or with a content type other than text/event-stream, the error is final: OnError fires, then OnClose, and the client does not reconnect.
procedure TForm1.OnSSEError(Sender: TObject; const aError: string);
begin
ShowMessage('SSE error: ' + aError);
end;