Skip to content

Commit 1c99673

Browse files
committed
1 parent fb3bbb7 commit 1c99673

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/audit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ function auditCmd (args, cb) {
189189
}).then((auditReport) => {
190190
return audit.submitForFullReport(auditReport)
191191
}).catch((err) => {
192-
if (err.statusCode === 404 || err.statusCode >= 500) {
193-
const ne = new Error(`Your configured registry (${opts.registry}) does not support audit requests.`)
192+
if (err.statusCode >= 400) {
193+
const ne = new Error(`Your configured registry (${opts.registry}) does not support audit requests, or the audit endpoint is temporarily unavailable.`)
194194
ne.code = 'ENOAUDIT'
195195
ne.wrapped = err
196196
throw ne

0 commit comments

Comments
 (0)