File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ Unix systems.
28
28
* [ ` 235e5d6df ` ] ( https://github.com/npm/cli/commit/235e5d6df6f427585ec58425f1f3339d08f39d8a )
29
29
ensure correct owner on cached all-packages metadata
30
30
([ @isaacs ] ( https://github.com/isaacs ) )
31
+ * [ ` fa6acd2ea ` ] ( https://github.com/npm/cli/commit/fa6acd2ea035bf26c04d7885b534d03d5b77e7ba )
32
+ [ npm.community#8450] ( https://npm.community/t/npm-audit-fails-with-child-requires-fails-because-requires-must-be-an-object/8540 )
33
+ audit: report server error on failure ([ @isaacs ] ( https://github.com/isaacs ) )
31
34
32
35
### DEPENDENCIES
33
36
Original file line number Diff line number Diff line change @@ -196,7 +196,10 @@ function auditCmd (args, cb) {
196
196
} else if ( err . statusCode === 404 ) {
197
197
msg = `Your configured registry (${ opts . registry } ) does not support audit requests.`
198
198
} else {
199
- msg = `Your configured registry (${ opts . registry } ) does not support audit requests, or the audit endpoint is temporarily unavailable.`
199
+ msg = `Your configured registry (${ opts . registry } ) may not support audit requests, or the audit endpoint may be temporarily unavailable.`
200
+ }
201
+ if ( err . body . length ) {
202
+ msg += '\nThe server said: ' + err . body
200
203
}
201
204
const ne = new Error ( msg )
202
205
ne . code = 'ENOAUDIT'
You can’t perform that action at this time.
0 commit comments