StylistFunctions.cs: Bare catch in ResolveUserIdFromSessionTokenAsync swallows infrastructure failures
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 16 min
- PR fusionados (30 d)
- 1
Descripción
## Problem
`PluckIt.Functions/Functions/StylistFunctions.cs:150-153` uses a bare `catch` with no logging or exception type filter. Infrastructure errors (network, Cosmos, config) are silently returned as `null`, indistinguishable from a legitimately invalid token.
```csharp
catch
{
return null;
}
```
## Impact
Infrastructure outages during session resolution appear as auth failures. Impossible to distinguish from invalid sessions in telemetry.
## Proposed Fix
```csharp
catch (SecurityTokenException) { return null; }
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error resolving session token.");
throw;
}
```
## Functionality Impact
Previously-silent infrastructure errors surface as 500s. Callers should handle accordingly.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.