Skip to content

Commit

Permalink
added debuig
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyAyala committed Oct 16, 2024
1 parent 2144f7d commit 8d8f11a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,16 @@ export const EnsureIndexIsCreated = async (): Promise<
> => {
try {
console.log("Ensuring index is created");
console.log(process.env.AZURE_SEARCH_INDEX_NAME);
const client = AzureAISearchIndexClientInstance();
const result = await client.getIndex(process.env.AZURE_SEARCH_INDEX_NAME);
console.log("Index already exists:", result);
console.log("Index exists:", result);
return {
status: "OK",
response: result,
};
} catch (e) {
console.log(e);
console.log("Index does not exist, creating new index");
return await CreateSearchIndex();
}
Expand Down

0 comments on commit 8d8f11a

Please sign in to comment.