mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Better exception handling.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
This commit is contained in:
@@ -243,7 +243,7 @@ def create_app(application):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
data_len = len(value.strip())
|
data_len = len(value.strip())
|
||||||
except TypeError:
|
except {TypeError, AttributeError}:
|
||||||
application.logger.error(f"Env Var {key} invalid type: {type(value)}")
|
application.logger.error(f"Env Var {key} invalid type: {type(value)}")
|
||||||
else:
|
else:
|
||||||
application.logger.info(f"Env Var {key} Length: {data_len}")
|
application.logger.info(f"Env Var {key} Length: {data_len}")
|
||||||
|
|||||||
Reference in New Issue
Block a user