Skip to content

Commit 83a871d

Browse files
committed
chore(djsdocs): log non-200 meilisearch api responses
1 parent 0e4ded8 commit 83a871d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/functions/autocomplete/docsAutoComplete.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ export async function djsMeiliSearch(query: string, version: string) {
174174

175175
const docsResult = (await searchResult.json()) as any;
176176

177+
if (searchResult.status !== 200) {
178+
logger.error(docsResult, `Received non-200 on docs autocomplete`);
179+
throw new Error(docsResult);
180+
}
181+
177182
const groupedHits = new Map<string, [string, any][]>();
178183

179184
for (const result of docsResult.results) {

0 commit comments

Comments
 (0)