@argos-ci/api-client 0.6.0 → 0.6.2
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/dist/index.d.ts +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +10 -11
package/dist/index.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ interface components {
|
|
|
124
124
|
/** @description Error response */
|
|
125
125
|
Error: {
|
|
126
126
|
error: string;
|
|
127
|
-
details
|
|
127
|
+
details?: {
|
|
128
128
|
message: string;
|
|
129
129
|
}[];
|
|
130
130
|
};
|
|
@@ -698,7 +698,7 @@ declare namespace ArgosAPISchema {
|
|
|
698
698
|
/** @description Error response */
|
|
699
699
|
Error: {
|
|
700
700
|
error: string;
|
|
701
|
-
details
|
|
701
|
+
details?: {
|
|
702
702
|
message: string;
|
|
703
703
|
}[];
|
|
704
704
|
};
|
|
@@ -1162,7 +1162,7 @@ declare class APIError extends Error {
|
|
|
1162
1162
|
*/
|
|
1163
1163
|
declare function throwAPIError(error: {
|
|
1164
1164
|
error: string;
|
|
1165
|
-
details
|
|
1165
|
+
details?: {
|
|
1166
1166
|
message: string;
|
|
1167
1167
|
}[];
|
|
1168
1168
|
}): never;
|
package/dist/index.mjs
CHANGED
|
@@ -28,8 +28,8 @@ class APIError extends Error {
|
|
|
28
28
|
* Handle API errors.
|
|
29
29
|
*/ function throwAPIError(error) {
|
|
30
30
|
debug("API error", error);
|
|
31
|
-
const detailMessage = error.details
|
|
32
|
-
throw new APIError(`${error.error}: ${detailMessage}`);
|
|
31
|
+
const detailMessage = error.details?.map((detail)=>detail.message).join(", ");
|
|
32
|
+
throw new APIError(detailMessage ? `${error.error}: ${detailMessage}` : error.error);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export { APIError, schema as ArgosAPISchema, createClient, throwAPIError };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/api-client",
|
|
3
|
-
"description": "Argos API
|
|
4
|
-
"version": "0.6.
|
|
3
|
+
"description": "Argos API Client library.",
|
|
4
|
+
"version": "0.6.2",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -9,15 +9,14 @@
|
|
|
9
9
|
"url": "https://github.com/argos-ci/argos-javascript.git",
|
|
10
10
|
"directory": "packages/api-client"
|
|
11
11
|
},
|
|
12
|
+
"homepage": "https://github.com/argos-ci/argos-javascript/blob/main/packages/api-client/README.md",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/argos-ci/argos-javascript/issues"
|
|
15
|
+
},
|
|
12
16
|
"keywords": [
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"test automation",
|
|
17
|
-
"testing",
|
|
18
|
-
"visual testing",
|
|
19
|
-
"regression",
|
|
20
|
-
"visual regression"
|
|
17
|
+
"api",
|
|
18
|
+
"openapi",
|
|
19
|
+
"argos"
|
|
21
20
|
],
|
|
22
21
|
"publishConfig": {
|
|
23
22
|
"access": "public"
|
|
@@ -50,5 +49,5 @@
|
|
|
50
49
|
"debug": "^4.3.6",
|
|
51
50
|
"openapi-fetch": "^0.11.1"
|
|
52
51
|
},
|
|
53
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "d0fa8cd790ffd2343d1cd32706bcb757c4f3b26e"
|
|
54
53
|
}
|