Optionalbody: unknownOptional ReadonlybodyResponse body: parsed JSON when the body is JSON, otherwise the raw text.
undefined when the response had no body or it could not be read.
OptionalcauseOptional ReadonlydetailHuman-readable reason extracted from the response body, such as
'scoped packages are not currently supported in bulk lookups'.
OptionalstackReadonlystatusHTTP status code (e.g. 404, 401, 403)
ReadonlystatusHTTP status text (e.g. 'Not Found'). Often empty: many servers, and
HTTP/2, do not send one — prefer NpmApiError.status and NpmApiError.detail.
Thrown when the npm Registry API returns a non-2xx response.
Example