File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -704,6 +704,13 @@ class WebSocketTransport {
704
704
}
705
705
```
706
706
707
+ ### Errors
708
+
709
+ - [ ` HyperliquidError ` ] ( src/errors.ts#L2 ) - Base error class for all SDK errors.
710
+ - [ ` TransportError ` ] ( src/transports/base.ts#L49 ) - Thrown when a transport layer error occurs.
711
+ - [ ` ApiRequestError ` ] ( src/clients//exchange.ts#L294 ) - Thrown when an API request fails.
712
+ - [ ` SchemaError ` ] ( src/schemas/mod.ts#L79 ) - Thrown when a schema validation error occurs.
713
+
707
714
## Additional Import Points
708
715
709
716
### ` /schemas `
Original file line number Diff line number Diff line change 5
5
* ```ts
6
6
* import { OrderRequest, parser } from "@nktkas/hyperliquid/schemas";
7
7
* // ^^^^^^^^^^^^
8
- * // both a Valibot schema and a TypeScript type
8
+ * // both a valibot schema and a typescript type
9
9
*
10
10
* const action = {
11
11
* type: "order",
21
21
* } satisfies OrderRequest["action"]; // can be used as type
22
22
*
23
23
* // or as valibot schema
24
- * // ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄
24
+ * // ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄
25
25
* const validatedAction = parser(OrderRequest.entries.action)(action);
26
26
* // ^^^^^^
27
27
* // validates, formats, sorts object keys for correct signature generation
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export interface Subscription {
45
45
resubscribeSignal ?: AbortSignal ;
46
46
}
47
47
48
- /** Thrown when a transport error occurs. */
48
+ /** Thrown when a transport layer error occurs. */
49
49
export class TransportError extends HyperliquidError {
50
50
constructor ( message ?: string , options ?: ErrorOptions ) {
51
51
super ( message , options ) ;
You can’t perform that action at this time.
0 commit comments