diff --git a/.yarn/versions/6ff06c58.yml b/.yarn/versions/6ff06c58.yml new file mode 100644 index 00000000000..a84d0d30a4e --- /dev/null +++ b/.yarn/versions/6ff06c58.yml @@ -0,0 +1,35 @@ +releases: + "@yarnpkg/core": patch + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-essentials" + - "@yarnpkg/plugin-exec" + - "@yarnpkg/plugin-file" + - "@yarnpkg/plugin-git" + - "@yarnpkg/plugin-github" + - "@yarnpkg/plugin-http" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-jsr" + - "@yarnpkg/plugin-link" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm" + - "@yarnpkg/plugin-npm-cli" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-patch" + - "@yarnpkg/plugin-pnp" + - "@yarnpkg/plugin-pnpm" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - "@yarnpkg/builder" + - "@yarnpkg/cli" + - "@yarnpkg/doctor" + - "@yarnpkg/extensions" + - "@yarnpkg/nm" + - "@yarnpkg/pnpify" + - "@yarnpkg/sdks" diff --git a/packages/yarnpkg-core/sources/httpUtils.ts b/packages/yarnpkg-core/sources/httpUtils.ts index c83815ac3f2..452ce6d09fd 100644 --- a/packages/yarnpkg-core/sources/httpUtils.ts +++ b/packages/yarnpkg-core/sources/httpUtils.ts @@ -58,6 +58,13 @@ async function prettyNetworkError(response: Promise, {configuration, c message += `(can be increased via ${formatUtils.pretty(configuration, `httpTimeout`, formatUtils.Type.SETTING)})`; const networkError = new ReportError(MessageName.NETWORK_ERROR, message, report => { + if (err.response?.headers[`content-type`]?.includes(`application/problem+json`) && err.response?.body) { + report.reportError(MessageName.NETWORK_ERROR, ` ${formatUtils.prettyField(configuration, { + label: `RFC9457`, + value: formatUtils.tuple(formatUtils.Type.INSPECT, err.response.body.toString()), + })}`); + } + if (err.response) { report.reportError(MessageName.NETWORK_ERROR, ` ${formatUtils.prettyField(configuration, { label: `Response Code`,