@exodus/errors 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/errors@3.2.0...@exodus/errors@3.3.0) (2025-08-08)
7
+
8
+ ### Features
9
+
10
+ - feat(errors): add network error patterns to common errors (#13516)
11
+
6
12
  ## [3.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/errors@3.1.0...@exodus/errors@3.2.0) (2025-08-07)
7
13
 
8
14
  ### Features
@@ -43,6 +43,18 @@ declare const commonErrors: readonly [{
43
43
  }, {
44
44
  readonly pattern: RegExp;
45
45
  readonly normalized: "JSON Parse error";
46
+ }, {
47
+ readonly pattern: RegExp;
48
+ readonly normalized: "Network request failed";
49
+ }, {
50
+ readonly pattern: RegExp;
51
+ readonly normalized: "Network error";
52
+ }, {
53
+ readonly pattern: RegExp;
54
+ readonly normalized: "Connection failed";
55
+ }, {
56
+ readonly pattern: RegExp;
57
+ readonly normalized: "Request failed";
46
58
  }];
47
59
  export type CommonErrorString = (typeof commonErrors)[number]['normalized'];
48
60
  export declare function toCommonErrorMessage(errorMessage: string): CommonErrorString | undefined;
@@ -59,6 +59,22 @@ const commonErrors = [
59
59
  pattern: /^JSON Parse error:/iu,
60
60
  normalized: 'JSON Parse error',
61
61
  },
62
+ {
63
+ pattern: /network request failed/iu,
64
+ normalized: 'Network request failed',
65
+ },
66
+ {
67
+ pattern: /network error/iu,
68
+ normalized: 'Network error',
69
+ },
70
+ {
71
+ pattern: /connection failed/iu,
72
+ normalized: 'Connection failed',
73
+ },
74
+ {
75
+ pattern: /request failed/iu,
76
+ normalized: 'Request failed',
77
+ },
62
78
  ];
63
79
  export function toCommonErrorMessage(errorMessage) {
64
80
  if (!errorMessage)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exodus/errors",
3
3
  "type": "module",
4
- "version": "3.2.0",
4
+ "version": "3.3.0",
5
5
  "description": "Utilities for error handling in client code, such as sanitization",
6
6
  "author": "Exodus Movement, Inc.",
7
7
  "repository": {
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "b229da233485c8301fa03c8b189a55f866eb4fe0"
47
+ "gitHead": "15487091c1c6bd495e315ea164df34fb314ee156"
48
48
  }