File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
dotnet/src/SemanticKernel.Core/Data/TextSearch Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -481,10 +481,19 @@ private async IAsyncEnumerable<string> GetResultsAsStringAsync(IAsyncEnumerable<
481481 // Create lambda: record => record.FieldName == value
482482 return Expression . Lambda < Func < TRecord , bool > > ( equality , parameter ) ;
483483 }
484- catch ( Exception )
484+ catch ( ArgumentException )
485485 {
486- // If any reflection or expression building fails, return null
487- // This maintains backward compatibility rather than throwing exceptions
486+ // Invalid property name or expression parameter
487+ return null ;
488+ }
489+ catch ( InvalidOperationException )
490+ {
491+ // Expression building failed due to type incompatibility
492+ return null ;
493+ }
494+ catch ( TargetParameterCountException )
495+ {
496+ // Lambda expression parameter mismatch
488497 return null ;
489498 }
490499 }
You can’t perform that action at this time.
0 commit comments