for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author @jenschude <[email protected]>
*/
namespace Commercetools\Core\Error;
* Exeption for response with status code 409
* @package Commercetools\Core\Error
* @description
* When trying to update a resource with a version which differs from the version stored at the commercetools
* platform the API will respond with status code 409.
class ConcurrentModificationException extends ClientErrorException
{
public function getCurrentVersion()
$error = $this->getErrorContainer()->getByCode(ConcurrentModificationError::CODE);
if ($error instanceof ConcurrentModificationError) {
return $error->getCurrentVersion();
}
return null;