ConfigurationException¶
This docs was updated at: 2026-02-23
com.paragon.responses.exception.ConfigurationException ยท Class
Extends AgentleException
Exception thrown when required configuration is missing or invalid.
This exception is thrown during builder validation and is not retryable.
Example usage:
try {
Responder responder = Responder.builder()
.openRouter()
// Missing apiKey!
.build();
} catch (ConfigurationException e) {
log.error("Config error: {}", e.suggestion());
}
Methods¶
ConfigurationException¶
public ConfigurationException(
@NonNull String message, @Nullable String configKey, @Nullable String suggestion)
Creates a new ConfigurationException.
Parameters
| Name | Description |
|---|---|
message |
the error message |
configKey |
the configuration key that is missing or invalid |
suggestion |
optional resolution hint |
missing¶
Creates a missing configuration exception.
Parameters
| Name | Description |
|---|---|
configKey |
the missing configuration key |
Returns
a new ConfigurationException
invalid¶
Creates an invalid configuration exception.
Parameters
| Name | Description |
|---|---|
configKey |
the invalid configuration key |
reason |
why the value is invalid |
Returns
a new ConfigurationException
configKey¶
Returns the configuration key that caused the error.
Returns
the config key, or null if not specific to a key