(int $httpCode, array $curlResult, array $cache)
| 274 | } |
| 275 | |
| 276 | private function buildHttpErrorResult(int $httpCode, array $curlResult, array $cache): array { |
| 277 | return [ |
| 278 | 'header' => [], |
| 279 | 'dimensions' => [], |
| 280 | 'data' => [], |
| 281 | 'rawdata' => $curlResult, |
| 282 | 'error' => $curlResult['request_error'] ?? $this->getHttpErrorMessage($httpCode, $curlResult['data'] ?? []), |
| 283 | 'cache' => $cache, |
| 284 | ]; |
| 285 | } |
| 286 | |
| 287 | private function getHttpErrorMessage(int $httpCode, array $responseData): string { |
| 288 | if ($httpCode === 401) { |
no test coverage detected