public function testReturnsStatusCode()
 {
     $client = $this->getTestClient('product');
     $trans = new CommandTransaction($client, new Command('foo'));
     $trans->response = new Response(400);
     $exception = new SdkException('Foo', $trans);
     $this->assertEquals(400, $exception->getStatusCode());
 }
 /**
  * Check if an exception satisfies a success or failure acceptor.
  *
  * @param SdkException $e
  * @param array                     $config
  *
  * @return bool|null true/false for success/failure; null for no transition
  */
 private function checkErrorAcceptor(SdkException $e, array $config)
 {
     if ($config['success_type'] == 'error' && $e->getApiErrorCode() == $config['success_value']) {
         // Mark as a success
         return true;
     }
     // Mark as an attempt
     return null;
 }