We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ffc1c06 + 5f4961b commit 961dc65Copy full SHA for 961dc65
includes/Utils/AISearchUtil.php
@@ -80,6 +80,12 @@ public static function get_search_results(
80
81
$parsed_response = json_decode( wp_remote_retrieve_body( $response ), true );
82
83
+ if ( isset( $parsed_response['status'] ) && 'Failure' === $parsed_response['status'] ) {
84
+ return array(
85
+ 'error' => __( 'We are unable to process the request at this moment' ),
86
+ );
87
+ }
88
+
89
try {
90
return array(
91
'result' => $parsed_response['payload']['choices'],
0 commit comments