aws / aws/aws-encryption-sdk-python
Logging an exception instead of / and a `raise` pollutes the log with extra traceback.
- Lenguaje dominante
- Python
- Estrellas
- 255
- Forks
- 92
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 2
Descripción
### Problem:
In many places in the SDK codebase, there are exception logging using the `_LOGGER.exception`. This logs the traceback of the exception. The encountered exception might then be bubbled up to the caller, or to the exit call which then again logs this exception. This causes duplicate logging at best, and confusion at worst since the exception message/type can be different.
### Solution:
Clean up the logging, and use raise over logging the exception wherever possible.
Ref https://github.com/aws/aws-encryption-sdk-python/issues/566
[//]: # (NOTE: If you believe this might be a security issue, please email aws-security@amazon.com instead of creating a GitHub issue. For more details, see the AWS Vulnerability Reporting Guide: https://aws.amazon.com/security/vulnerability-reporting/ )
Guía de contribución
Línea de trabajo
Busca en la base de código del SDK los usos de `_LOGGER.exception` y revisa el issue relacionado #566 para obtener contexto. Rastrea si cada excepción se propaga a un caller o a una ruta de salida que vuelve a registrarla; se considera terminado cuando se elimina el registro redundante del traceback, pero la excepción sigue llegando al caller correspondiente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- security
- Tipo de issue
- Refactorización
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100