Skip to content

should show actual error message instead of just 412 when cli version does not meet the requirement #623

@nanjiangshu

Description

@nanjiangshu

Describe the bug

When the CLI version does not match the requirement. Users get the error message

Error: failed to get datasets, reason: server returned status 412

This error message is not very informative.

It should show the original error message. e..g

Error: Your sda-cli client version is outdated, please update to at least version 'v0.3.0'.

Steps to reproduce

Run the following command

./sda-cli-v0.2.1 --config s3cmd-bp-download.conf list  --url https://download.bp.nbis.se  --datasets 

You get

Error: failed to get datasets, reason: server returned status 412

Expected behavior

  • SDA-CLI show the informative error message when the CLI version does not meet the requirement
  • Tests verifying the fix are added

Demo

Run an old version of sda-cli, show the incorrect message. Run the new version, show the correct message.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions