Are you an LLM? You can read better optimized documentation at /documentation/api/client/type-aliases/SafeResult.md for this page in Markdown format
ws-asyncapi API / client / SafeResult
Type Alias: SafeResult<Output, Errors>
SafeResult<
Output,Errors> = {data:Output;error:null; } | {data:null;error:TypedRpcError<Errors>; }
Defined in: .api-entries/client/index.d.ts:242
Result of safeRequest: a discriminated union you narrow on error. On success error is null; on failure data is null and error carries a typed, discriminated code.
Type Parameters
Output
Output
Errors
Errors