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");
Description
In
org.zstack.sdk.ZSClient.errorIfNotConfigured, when the client is usedbefore being configured, an error is thrown with:
However,
ZSClientexposesconfigure(ZSConfig c)as its publicinitialization method — there is no
setConfig()method. The error messagepoints 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