aws / aws/aws-encryption-sdk-python

Logging an exception instead of / and a `raise` pollutes the log with extra traceback.

Aperta
#615 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
255
Fork
92
Merge medio
2g 17h
PR unite (30g)
2

Descrizione

### 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/ )

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Search the SDK codebase for uses of `_LOGGER.exception` and review the related issue #566 for context. Trace whether each exception is bubbled up to a caller or exit path that logs it again; done means redundant traceback logging is removed while the exception still reaches the appropriate caller.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
security
Tipo di issue
Refactoring
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.