Skip to content

[ZSvirt] bug: sdk: error message references non-existent setConfig() method #46

Description

@chayu163

Description

In org.zstack.sdk.ZSClient.errorIfNotConfigured, when the client is used
before being configured, an error is thrown with:

throw new RuntimeException("setConfig() must be called before any methods");

However, ZSClient exposes configure(ZSConfig c) as its public
initialization method — there is no setConfig() method. The error message
points users to a method that does not exist, which is misleading when
troubleshooting this failure.

Expected behavior

The error message should name the actual method to call.

Proposed fix

throw new RuntimeException("configure() must be called before any methods");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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