Skip to content

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

Open
@robfig

Description

@robfig

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.

Metadata

Metadata

Assignees

No one assigned

    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