Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ejseqera opened this issue Jan 9, 2025 · 0 comments
Open

Comments

@ejseqera
Copy link
Member

ejseqera commented Jan 9, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant