src/GovTribe/LaravelKinvey/Client/Exception/KinveyResponseExceptionFactory.php
public function fromResponse(RequestInterface $request, Response $response)
	{
		$message = $response->json();

		$parts = array(
			'type' => isset($message['error']) ? $message['error'] : null,
			'description' => isset($message['description']) ? $message['description'] : null,
			'request_id' => $response->getHeaders()->get('x-kinvey-request-id'),
			'debug' => isset($message['debug']) && !empty($message['debug']) ? $message['debug'] : null,
		);

		return $this->createException($request, $response, $parts);
	}
public function fromResponse(RequestInterface $request, Response $response)
	{
		$message = $response->json();

		$parts = array(
			'type' => isset($message['error']) ? $message['error'] : null,
			'description' => isset($message['description']) ? $message['description'] : null,
			'request_id' => $response->getHeaders()->get('x-kinvey-request-id'),
			'debug' => isset($message['debug']) && !empty($message['debug']) ? $message['debug'] : null,
		);

		return $this->createException($request, $response, $parts);
	}
public function fromResponse ( RequestInterface $ request , Response $ response ) { $ message = $ response -> json ( ) ; $ parts = array ( 'type' => isset ( $ message [ 'error' ] ) ? $ message [ 'error' ] : null , 'description' => isset ( $ message [ 'description' ] ) ? $ message [ 'description' ] : null , 'request_id' => $ response -> getHeaders ( ) -> get ( 'x-kinvey-request-id' ) , 'debug' => isset ( $ message [ 'debug' ] ) && ! empty ( $ message [ 'debug' ] ) ? $ message [ 'debug' ] : null , ) ; return $ this -> createException ( $ request , $ response , $ parts ) ; }
Returns a Kinvey service specific exception

@param RequestInterface $request  Unsuccessful request
@param Response         $response Unsuccessful response that was encountered

@return Exception
Returns a Kinvey service specific exception