Tighten validateApiResponse for v2 array shape
This commit is contained in:
@@ -100,7 +100,7 @@ function executeApiCall($apiEndpoint, $apiKey) {
|
|||||||
*/
|
*/
|
||||||
function validateApiResponse($responseData) {
|
function validateApiResponse($responseData) {
|
||||||
if (!isset($responseData['log']) || !is_array($responseData['log'])) {
|
if (!isset($responseData['log']) || !is_array($responseData['log'])) {
|
||||||
throw new ApiValidationException("Invalid log data received from the API.");
|
throw new ApiValidationException('Invalid log data received from the API.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user