@eik/cli 2.0.37 → 2.0.38

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
@@ -1,3 +1,10 @@
1
+ ## [2.0.38](https://github.com/eik-lib/cli/compare/v2.0.37...v2.0.38) (2024-05-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * include message from base error for unexpected status codes ([#549](https://github.com/eik-lib/cli/issues/549)) ([d5637df](https://github.com/eik-lib/cli/commit/d5637dff5acca4bc8f2cc91799c9c96555e9bf1b))
7
+
1
8
  ## [2.0.37](https://github.com/eik-lib/cli/compare/v2.0.36...v2.0.37) (2024-05-06)
2
9
 
3
10
 
@@ -33,26 +33,32 @@ module.exports = class UploadFiles extends Task {
33
33
  switch (err.statusCode) {
34
34
  case 400:
35
35
  throw new Error(
36
- 'Client attempted to send an invalid URL parameter',
36
+ `${err.statusCode}: Client attempted to send an invalid URL parameter`,
37
37
  );
38
38
  case 401:
39
- throw new Error('Client unauthorized with server');
39
+ throw new Error(
40
+ `${err.statusCode}: Client unauthorized with server`,
41
+ );
40
42
  case 404:
41
- throw new Error('Client could not find server route');
43
+ throw new Error(
44
+ `${err.statusCode}: Client could not find server route`,
45
+ );
42
46
  case 409:
43
47
  throw new Error(
44
48
  `Package with name "${name}" and version "${version}" already exists on server`,
45
49
  );
46
50
  case 415:
47
51
  throw new Error(
48
- 'Client attempted to send an unsupported file format to server',
52
+ `${err.statusCode}: Client attempted to send an unsupported file format to server`,
49
53
  );
50
54
  case 502:
51
55
  throw new Error(
52
- 'Server was unable to write file to storage',
56
+ `${err.statusCode}: Server was unable to write file to storage, ${err.message}`,
53
57
  );
54
58
  default:
55
- throw new Error('Server failed');
59
+ throw new Error(
60
+ `${err.statusCode}: Server failed, ${err.message}`,
61
+ );
56
62
  }
57
63
  }
58
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eik/cli",
3
- "version": "2.0.37",
3
+ "version": "2.0.38",
4
4
  "description": "CLI tool for publishing assets to an Eik server",
5
5
  "main": "./classes/index.js",
6
6
  "bin": {