private function handleUnknownError($e)
	{
		$response = $e->getResponse();
		$body = $response->json();

		// switching on the first number of status code
		// we are using floor to round off to the lower end
		// eg. floor(404 / 100) == 4
		switch(floor($response->getStatusCode() / 100))
		{
			// client error (4xx)
			case 4:
				throw new Errors\InvalidRequestError($body['error']['message'], $body['error']['code'], $body['error']['type']);
				break;

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

			// very generic error (if all else fails)
			default:
				throw new Errors\Error($body['error']['message'], $body['error']['code'], $body['error']['type']);
		}
	}