From b3c6744515b00488cfa11750a018075a6697c0a7 Mon Sep 17 00:00:00 2001 From: kevinpricethesecond Date: Mon, 16 Sep 2024 16:54:03 -0500 Subject: [PATCH] fix 400 error on GET with content-type header --- service/api.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/service/api.py b/service/api.py index 21bcc68..ffee57e 100644 --- a/service/api.py +++ b/service/api.py @@ -48,9 +48,10 @@ def __init__(self, url_map, *items): @app.before_request def log_before(): - logger.debug(f'========== Received new request:: {request} ==========') - if request.json: - logger.debug(f'json:: {request.json}') + logger.info(f'========== Received new request ==========') + logger.info({request}) + # if request.json: + # logger.debug(f'json:: {request.json}') @app.after_request def log_after(response): @@ -58,5 +59,5 @@ def log_after(response): if response.status == '500 INTERNAL SERVER ERROR': logger.error(f'\tEncountered error during request: {response.json}') - logger.debug(f'========== Ended request with status:: {response.status} ==========\n') + logger.info(f'========== Ended request with status:: {response.status} ==========\n') return response