fix: ignore analyzer rule when catching exception
This commit is contained in:
@@ -71,7 +71,9 @@ public sealed class GeminiClient : IGeminiClient
|
|||||||
|
|
||||||
return geminiResponse.GetText();
|
return geminiResponse.GetText();
|
||||||
}
|
}
|
||||||
|
#pragma warning disable CA1031 // Do not catch general exception types
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
#pragma warning restore CA1031 // Do not catch general exception types
|
||||||
{
|
{
|
||||||
_logger.LogError(e, "Failed to generate content");
|
_logger.LogError(e, "Failed to generate content");
|
||||||
return errorMessage;
|
return errorMessage;
|
||||||
|
|||||||
Reference in New Issue
Block a user