private function handleError($e)
	{
		// if there's no response attached to the exception,
		// we will assume that the request was never sent and
		// thus will throw a network error
		if( ! $e->hasResponse())
		{
			throw new Errors\NetworkError;
		}

		// if there's a response attached to the exception,
		// we will figure out which error to throw based on
		// the HTTP status code of response
		$response = $e->getResponse();
		$body = $response->json();
		switch($response->getStatusCode())
		{
			case 400:
				throw new Errors\InvalidRequestError($body['error']['message'], $body['error']['code'], $body['error']['type']);
				break;

			case 401:
				throw new Errors\AuthenticationError($body['error']['message'], $body['error']['code'], $body['error']['type']);
				break;
				
			case 403:
				throw new Errors\ForbiddenError($body['error']['message'], $body['error']['code'], $body['error']['type']);
				break;

			case 404:
				throw new Errors\NotFoundError($body['error']['message'], $body['error']['code'], $body['error']['type']);
				break;

			case 500:
				throw new Errors\ServiceError($body['error']['message'], $body['error']['code'], $body['error']['type']);
				break;

			// for backwards compatibility, we will handle other
			// HTTP status codes too (to keep the SDK working,
			// even when we send more variants of HTTP status codes
			// through API)
			default:
				return $this->handleUnknownError($e);
		}
	}