Skip to content

Yarn (publish) doesn't consider 417 as an error code #6359

@Ojisama

Description

@Ojisama

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When yarn receives a response with a status code 417, it doesn't consider that as an error code and doesn't fail.

$>  yarn publish --verbose
...
[3/4] Publishing...
verbose 6.037 Performing "PUT" request to "https://**********".
verbose 6.709 Request "https://**********" finished with status code 417.
success Published.

If the current behavior is a bug, please provide the steps to reproduce.

I don't really know how to reproduce this, the 417 comes from our internal firewall. You could:

  1. Setup a local server that only returns 417 codes
  2. Setup your registry to your local server
  3. Try to publish a package

What is the expected behavior?
I think yarn should fail publish when encountering 417, and more generally all 4xxs and 5xxs as NPM does:

$>  npm publish
...
npm ERR! publish Failed PUT 417

Please mention your node.js, yarn and operating system version.

lib version
node.js 10.5.0
yarn 1.9.4

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions