This commit is contained in:
Sidharth Vinod
2024-10-08 13:34:52 +05:30
parent f5a90ff6dc
commit a989d22255
4 changed files with 23 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ jobs:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_PARALLEL: true
ARGOS_PARALLEL_TOTAL: ${{ strategy.job-total }}
ARGOS_PARALLEL_INDEX: ${{ matrix.containers }}
ARGOS_PARALLEL_INDEX: ${{ strategy.job-index }}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
SPLIT_FILE: 'cypress/timings.json'

View File

@@ -136,7 +136,8 @@
"pnpm": {
"patchedDependencies": {
"roughjs": "patches/roughjs.patch",
"@argos-ci/core": "patches/@argos-ci__core.patch"
"@argos-ci/core": "patches/@argos-ci__core.patch",
"@argos-ci/api-client": "patches/@argos-ci__api-client.patch"
}
}
}

View File

@@ -0,0 +1,15 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 121ed29385ceca37f7cb6b7188709d7ec506dfa6..41092962ccde5177a261b816cffb55f6a1615d6e 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -25,6 +25,10 @@ class APIError extends Error {
*/ function throwAPIError(fetchResponse) {
const { error, response } = fetchResponse;
if (error && typeof error === "object" && "error" in error && typeof error.error === "string") {
+ const message = error.details?.[0]?.message;
+ if (message) {
+ throw new APIError(`${error.error}: ${message}`);
+ }
throw new APIError(error.error);
}
throw new APIError(`API error: ${response.status} ${response.statusText}`);

7
pnpm-lock.yaml generated
View File

@@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
patchedDependencies:
'@argos-ci/api-client':
hash: gzf7rvzoe5uw7phud3jvxl3h2u
path: patches/@argos-ci__api-client.patch
'@argos-ci/core':
hash: ew23wb5pwcjiy5eope7s6dj3ty
path: patches/@argos-ci__core.patch
@@ -9943,7 +9946,7 @@ snapshots:
'@applitools/utils@1.7.4': {}
'@argos-ci/api-client@0.5.0':
'@argos-ci/api-client@0.5.0(patch_hash=gzf7rvzoe5uw7phud3jvxl3h2u)':
dependencies:
openapi-fetch: 0.11.1
@@ -9951,7 +9954,7 @@ snapshots:
'@argos-ci/core@2.8.1(patch_hash=ew23wb5pwcjiy5eope7s6dj3ty)':
dependencies:
'@argos-ci/api-client': 0.5.0
'@argos-ci/api-client': 0.5.0(patch_hash=gzf7rvzoe5uw7phud3jvxl3h2u)
'@argos-ci/util': 2.1.1
axios: 1.7.5(debug@4.3.7)
convict: 6.2.4