From d664182bd7d90db13c3a17d76ab5862c8b6e03d1 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 8 Mar 2025 11:12:21 +0100 Subject: [PATCH] Improved the error handling in the ERI data source info dialog --- .../Dialogs/DataSourceERI-V1InfoDialog.razor | 3 ++- .../Dialogs/DataSourceERI-V1InfoDialog.razor.cs | 1 - app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor b/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor index 984d2e40..41344b9b 100644 --- a/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor +++ b/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor @@ -59,7 +59,8 @@ Embeddings - @if (!info.Embeddings.Any()) + @* ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract *@ + @if (info.Embeddings is null || !info.Embeddings.Any()) { The data source does not provide any embedding information. diff --git a/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor.cs b/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor.cs index 192347d0..5f5a4428 100644 --- a/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/DataSourceERI-V1InfoDialog.razor.cs @@ -130,7 +130,6 @@ public partial class DataSourceERI_V1InfoDialog : ComponentBase, IAsyncDisposabl } this.retrievalInfoformation = retrievalInfoResult.Data ?? []; - this.StateHasChanged(); } catch (Exception e) diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md index ab90698f..5cdac4d8 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md @@ -2,4 +2,5 @@ - Added the "Community & Code" section to the about page. It includes links to the GitHub repositories and the project website. - Improved the ERI client to expect JSON responses and send JSON requests using camel case. - Improved the ERI client to raise an error when the server responds with additional JSON data that is not expected. +- Improved the error handling in the ERI data source info dialog in cases where servers respond with an invalid message. - Improved the error handling for the entire RAG process. \ No newline at end of file