diff --git a/api.php b/api.php index 342186f8..7d9e488f 100644 --- a/api.php +++ b/api.php @@ -24,6 +24,9 @@ } $results = fetch_search_results($opts, false); + if (array_key_exists("error", $results)) { + http_response_code(500); + } header("Content-Type: application/json"); echo json_encode($results); ?>