@@ -71,6 +71,7 @@ public function getResponseBody(): ?stdClass
7171
7272 /**
7373 * Convert the exception details to an array.
74+ *
7475 * @throws JsonException
7576 */
7677 public function toArray (): array
@@ -86,6 +87,7 @@ public function toArray(): array
8687
8788 /**
8889 * Convert the exception details to JSON.
90+ *
8991 * @throws JsonException
9092 */
9193 public function toJson (): string
@@ -95,6 +97,7 @@ public function toJson(): string
9597
9698 /**
9799 * Create a `GrokException` from an API response.
100+ *
98101 * @throws JsonException
99102 */
100103 public static function fromResponse (ResponseInterface $ response ): self
@@ -125,6 +128,7 @@ public static function fromResponse(ResponseInterface $response): self
125128
126129 /**
127130 * Handle exceptions from Guzzle.
131+ *
128132 * @throws JsonException
129133 */
130134 public static function fromGuzzleException (ClientException $ exception ): self
@@ -138,7 +142,7 @@ public static function fromGuzzleException(ClientException $exception): self
138142 public static function missingApiKey (): self
139143 {
140144 return new self (
141- " No API key provided. Specify your API key in an Authorization header using Bearer auth. " ,
145+ ' No API key provided. Specify your API key in an Authorization header using Bearer auth. ' ,
142146 400 ,
143147 'authentication_error '
144148 );
@@ -150,7 +154,7 @@ public static function missingApiKey(): self
150154 public static function invalidApiKey (): self
151155 {
152156 return new self (
153- " Incorrect API key provided. Obtain an API key from https://console.x.ai. " ,
157+ ' Incorrect API key provided. Obtain an API key from https://console.x.ai. ' ,
154158 400 ,
155159 'invalid_api_key '
156160 );
@@ -162,7 +166,7 @@ public static function invalidApiKey(): self
162166 public static function invalidRequest (): self
163167 {
164168 return new self (
165- " Failed to deserialize the JSON body into the target type. Ensure request structure is correct. " ,
169+ ' Failed to deserialize the JSON body into the target type. Ensure request structure is correct. ' ,
166170 422 ,
167171 'invalid_request '
168172 );
0 commit comments