Class ConfigurationException

All Implemented Interfaces:
Serializable

public class ConfigurationException extends ChargebeeException
Exception thrown when there's an issue with SDK configuration.

This extends ChargebeeException to allow fluent builder usage without requiring try-catch blocks during client setup.

Common causes:

  • Missing required configuration (e.g., API key)
  • Invalid configuration values
  • Malformed URLs

Example:


 try {
     ChargebeeClient client = ChargebeeClient.builder()
         .siteName("my-site")
         // Missing apiKey!
         .build();
 } catch (ConfigurationException e) {
     System.err.println("Configuration error: " + e.getMessage());
 }
 

Note: This exception is NOT retryable as it indicates a programming error that must be fixed in the code.

See Also:
  • Constructor Details

    • ConfigurationException

      public ConfigurationException(String message)
      Creates a ConfigurationException with a message.
      Parameters:
      message - descriptive error message
    • ConfigurationException

      public ConfigurationException(String message, Throwable cause)
      Creates a ConfigurationException with a message and cause.
      Parameters:
      message - descriptive error message
      cause - the underlying cause
  • Method Details

    • isRetryable

      public boolean isRetryable()
      Configuration errors are never retryable as they indicate programming errors that must be fixed in the code.
      Overrides:
      isRetryable in class ChargebeeException
      Returns:
      false always
    • toString

      public String toString()
      Overrides:
      toString in class Throwable