Skip to content

Commit c098f94

Browse files
committed
docs: improve texts
1 parent d625c6a commit c098f94

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,13 @@ class WebSocketTransport {
704704
}
705705
```
706706

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+
707714
## Additional Import Points
708715

709716
### `/schemas`

src/schemas/mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* ```ts
66
* import { OrderRequest, parser } from "@nktkas/hyperliquid/schemas";
77
* // ^^^^^^^^^^^^
8-
* // both a Valibot schema and a TypeScript type
8+
* // both a valibot schema and a typescript type
99
*
1010
* const action = {
1111
* type: "order",
@@ -21,7 +21,7 @@
2121
* } satisfies OrderRequest["action"]; // can be used as type
2222
*
2323
* // or as valibot schema
24-
* // ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄
24+
* // ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄
2525
* const validatedAction = parser(OrderRequest.entries.action)(action);
2626
* // ^^^^^^
2727
* // validates, formats, sorts object keys for correct signature generation

src/transports/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export interface Subscription {
4545
resubscribeSignal?: AbortSignal;
4646
}
4747

48-
/** Thrown when a transport error occurs. */
48+
/** Thrown when a transport layer error occurs. */
4949
export class TransportError extends HyperliquidError {
5050
constructor(message?: string, options?: ErrorOptions) {
5151
super(message, options);

0 commit comments

Comments
 (0)