-
Notifications
You must be signed in to change notification settings - Fork 26
Avoid throwing System.Exception when retrieving Infisical secrets #768
Copy link
Copy link
Labels
C#C# related codeC# related codeMaintainabilitybugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededrefactoringRefactoring codeRefactoring codereliability
Description
What version of FlowSynx?
1.2.5
Describe the bug
File: src/FlowSynx.Infrastructure/Secrets/Infisical/InfisicalSecretProvider.cs
Line: 51
In the current implementation, a generic System.Exception is thrown when retrieving configuration secrets from Infisical fails:
throw new Exception(message, ex);Throwing System.Exception directly in user code is considered bad practice because it is too generic, making exception handling and diagnostics harder.
Proposed Fix:
throw new InvalidOperationException(message, ex);Benefits:
- Provides a meaningful, specific exception for consumers.
- Improves maintainability and readability of error handling.
- Allows callers to catch specific exceptions instead of a generic
System.Exception.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C#C# related codeC# related codeMaintainabilitybugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededrefactoringRefactoring codeRefactoring codereliability