aws / aws/aws-secretsmanager-caching-python

Don't wrap ResourceNotFoundException

Abierto
#20 2 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
146
Forks
32
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

If the secret is not on AWS Secrets Manager the client will throw a `ResourceNotFoundException` that will be wrapped in [`SecretCacheObject.__refresh`](https://github.com/aws/aws-secretsmanager-caching-python/blob/8b3ed311982096d6cb6a99ab33299ade3c9811b3/src/aws_secretsmanager_caching/cache/items.py#L97)

I think to **wrap `ResourceNotFoundException` is not good practice**: because after the client application has no way to understand that something is wrong in the configuration of Aws SM, and if you have a hook it will be triggered anyway even if an exception occurred and the value is None.
[the implementation of `SecretCacheHook` will receive `cached_obj = None` in the get method]

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza en src/aws_secretsmanager_caching/cache/items.py, en SecretCacheObject.__refresh, y luego lee cómo SecretCacheHook recibe cached_obj en la ruta de get. Confirma el comportamiento actual de wrapping para ResourceNotFoundException y define como terminado que se preserve esa excepción, de modo que los errores de configuración se puedan distinguir y el hook no se invoque con None.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, python
Área
backend, cloud, security
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.