christeredvartsen/imboclient-php — Issue #14: Provide a simple way to fetch the error from a failed request
Author: rexxars
Created: 2012-02-21 22:11:20+00:00
State: open

It would be a nice addition to use internal error codes coupled with class constants for a reliable way to handle errors.

For example;
```PHP
$response = $imbo->addImage($imgPath);
if (!$response->isSuccess()) {
if ($response->getErrorCode() == self::IMAGE_ALREADY_EXISTS) {
// Do something clever
}
}
```