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.
2828* [ ` 235e5d6df ` ] ( https://github.com/npm/cli/commit/235e5d6df6f427585ec58425f1f3339d08f39d8a )
2929 ensure correct owner on cached all-packages metadata
3030 ([ @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 ) )
3134
3235### DEPENDENCIES
3336
Original file line number Diff line number Diff line change @@ -196,7 +196,10 @@ function auditCmd (args, cb) {
196196 } else if ( err . statusCode === 404 ) {
197197 msg = `Your configured registry (${ opts . registry } ) does not support audit requests.`
198198 } 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
200203 }
201204 const ne = new Error ( msg )
202205 ne . code = 'ENOAUDIT'
You can’t perform that action at this time.
0 commit comments