ConfigurationException

Learn how to handle the error thrown when the SDK is misconfigured.

This exception is thrown when the SDK is misconfigured, such as missing credentials or no available HTTP client. It implements CroctException.

Example

This example handles a misconfigured SDK, such as missing credentials:

123456789
<?phpuse Croct\Plug\Croct;use Croct\Plug\Exception\ConfigurationException;
try {    $croct = Croct::fromDotenv();} catch (ConfigurationException $error) {    // Handle the misconfiguration, such as missing credentials.}