这是indexloc提供的服务,不要输入任何密码
Skip to content

Provide a more informative error when supplying an invalid API URL #473

@ejseqera

Description

@ejseqera

When providing an invalid endpoint URL either through setting TOWER_API_ENDPOINT or with the --url/-u option, the CLI raises a non-informative error.

> tw -u https://wrong.cloud.seqera.io/api launch --name hello-world --workspace seqera/showcase --compute-env seqera_aws_ireland_fusion_nvme --labels aws hello

 ERROR: error

Alternatively:

> export TOWER_API_ENDPOINT=https://wrong.cloud.seqera.io
> tw launch --name hello-world --workspace seqera/showcase --compute-env seqera_aws_ireland_fusion_nvme --labels aws hello

 ERROR: error

Other endpoints seem to return a more informative error but it would be helpful for this to be consistent for all subcommands:

> tw -u https://wrong.endpoint/api workspaces list

 ERROR: java.net.UnknownHostException: wrong.endpoint


 ERROR: Connection error. Check the connection using the command 'tw info'.

Version info:

    Details
   -------------------------+-----------------------------
    Tower API endpoint      | https://api.cloud.seqera.io
    Tower API version       | 1.25.0
    Tower version           | 24.2.0_cycle28
    CLI version             | 0.10.3 (a86eeed)
    CLI minimum API version | 1.15
    Authenticated user      | eshajoshi

   System health status
   ---------------------------------------+----
    Remote API server connection check    | OK
    Tower API version check               | OK
    Authentication API credential's token | OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions