File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { arrayUnique } from '@socketsecurity/registry/lib/arrays'
2
+ import { debugFn } from '@socketsecurity/registry/lib/debug'
3
+ import { logger } from '@socketsecurity/registry/lib/logger'
2
4
3
5
import { extractPurlsFromPnpmLockfile } from './pnpm.mts'
4
6
import { getPublicToken , setupSdk } from './sdk.mts'
5
7
import { addArtifactToAlertsMap } from './socket-package-alert.mts'
8
+ import constants from '../constants.mts'
6
9
7
10
import type { CompactSocketArtifact } from './alert/artifact.mts'
8
11
import type {
@@ -117,6 +120,16 @@ export async function getAlertsMapFromPurls(
117
120
throw new Error (
118
121
`Socket API server error (${ statusCode } ): ${ statusMessage } ` ,
119
122
)
123
+ } else {
124
+ const { spinner } = constants
125
+ spinner . stop ( )
126
+ debugFn ( 'Received a result=false:' , batchResult )
127
+ logger . fail (
128
+ `Received a ${ batchResult . status } response from Socket API which we consider a permanent failure:` ,
129
+ batchResult . error ,
130
+ batchResult . cause ? `( ${ batchResult . cause } )` : '' ,
131
+ )
132
+ break
120
133
}
121
134
remaining -= 1
122
135
if ( spinner && remaining > 0 ) {
You can’t perform that action at this time.
0 commit comments