Skip to content

[Bug] Cross-environment client-and-then-database should raise an error #79

@sl-at-ibm

Description

@sl-at-ibm

As we discussed yesterday, the getDatabase here:

        // implicitly PROD:
        DataAPIClient client = new DataAPIClient(new DataAPIClientOptions());

        // DEV endpoint:
        Database database =
            client.getDatabase(
                "https://00000000-0000-0000-0000-000000000000-us-east-1.apps.astra-dev.datastax.com",
                new DatabaseOptions("AstraCS:abc", new DataAPIClientOptions()));

        System.out.println("Got away with it.");

should raise an error since the environment detected in the endpoint (dev) does not match the one known to the client (main).

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