getMessage(), $e->getCode(), $e); } public static function fromRequestException(RequestException $e): self { try { return new self(object_get($e->getResponse()->object(), 'error'), $e->getStatus()); } catch (Throwable) { return self::fromThrowable($e); } } }