Skip to content

Commit 08d2c76

Browse files
committed
Refine result codes with more precise language
1 parent 9943791 commit 08d2c76

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/ensnode-sdk/src/shared/result/result-code.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,23 @@ export const RESULT_CODE_CLIENT_ERROR_CODES = [
5959
ResultCodes.ConnectionError,
6060
ResultCodes.RequestTimeout,
6161
ResultCodes.ClientUnrecognizedOperationResult,
62+
] as const;
63+
64+
/**
65+
* List of all error codes the client can return (client-originated + relayed from server).
66+
*/
67+
export const RESULT_CODE_ALL_ERROR_CODES = [
68+
...RESULT_CODE_CLIENT_ERROR_CODES,
6269
...RESULT_CODE_SERVER_ERROR_CODES,
6370
] as const;
6471

6572
/**
6673
* List of all ResultCodes.
6774
*/
68-
const RESULT_CODE_ALL_CODES = [
75+
export const RESULT_CODE_ALL_CODES = [
6976
ResultCodes.Loading,
7077
ResultCodes.Ok,
71-
...RESULT_CODE_CLIENT_ERROR_CODES,
78+
...RESULT_CODE_ALL_ERROR_CODES,
7279
] as const;
7380

7481
/**

0 commit comments

Comments
 (0)