@aikidosec/ci-api-client 1.0.7 → 1.0.8

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.
@@ -52,7 +52,12 @@ async function cli(repoId, commitId, options, command) {
52
52
  const onFail = (error) => {
53
53
  loader?.fail();
54
54
  if (error.response?.status && error.response?.status === 404) {
55
- outputError('Please verify your commit SHA');
55
+ if (error.response?.data?.reason_phrase) {
56
+ outputError(error.response?.data?.reason_phrase);
57
+ }
58
+ else {
59
+ outputError('Please verify your repository id or commit SHA');
60
+ }
56
61
  }
57
62
  else {
58
63
  outputHttpError(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikidosec/ci-api-client",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "CLI api client to easily integrate the Aikido public CI API into custom deploy scripts",
5
5
  "license": "MIT",
6
6
  "author": "Bert Devriese <bert@builtinbruges.com>",
@@ -144,9 +144,13 @@ async function cli(
144
144
  loader?.fail();
145
145
 
146
146
  if (error.response?.status && error.response?.status === 404) {
147
- outputError(
148
- 'Please verify your commit SHA'
149
- );
147
+ if(error.response?.data?.reason_phrase) {
148
+ outputError(error.response?.data?.reason_phrase);
149
+ } else {
150
+ outputError(
151
+ 'Please verify your repository id or commit SHA'
152
+ );
153
+ }
150
154
  } else {
151
155
  outputHttpError(error);
152
156
  }