From 677b1ed4935424e303b8369fdbdde79c20857c00 Mon Sep 17 00:00:00 2001 From: markdodgson Date: Fri, 27 Jun 2025 17:58:29 +0100 Subject: [PATCH 1/2] Implementation of RFC9457 --- packages/yarnpkg-core/sources/httpUtils.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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`, From e1d8d32b9caf3d3c9c4c2f2606e4b3800f664f23 Mon Sep 17 00:00:00 2001 From: markdodgson Date: Sat, 28 Jun 2025 09:47:18 +0100 Subject: [PATCH 2/2] version check --- .yarn/versions/6ff06c58.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .yarn/versions/6ff06c58.yml 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"