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

[BUG] Should have non-zero exit code on failure #73

Open
robfig opened this issue Feb 23, 2023 · 1 comment
Open

[BUG] Should have non-zero exit code on failure #73

robfig opened this issue Feb 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@robfig
Copy link

robfig commented Feb 23, 2023

What is the bug?

Amazon OpenSearch has many security controls, including network security configuration such as only permitting access from a VPC. In my case, an active VPN connection is required for developers to access it.

Opensearch-cli returns a 0 exit code when it fails to make the request due to lack of network access to the endpoint. It should return a non-zero exit code instead, since the execution unambiguously failed. In cases where the request was completed but a non-2xx status code was returned, it might be less clear, but a non-zero code is probably still warranted.

In this case, I wanted to detect failure to show a helpful message suggesting the developer connect to VPN if they haven't already.

@robfig robfig added bug Something isn't working untriaged labels Feb 23, 2023
@wbeckler
Copy link

This sounds like a good idea. Feel free to propose a solution/PR if you're up for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants