Skip to content

Commit

Permalink
ensure resp.status_code is int for logging middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
jrycw committed Mar 14, 2024
1 parent 9a04335 commit d3e820c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async def add_logging_middleware(request: Request, call_next) -> Response:
raise
finally:
process_time = time.perf_counter_ns() - start_time
status_code = response.status_code
status_code = int(response.status_code) # For <enum 'HTTPStatus'>
url = get_path_with_query_string(request.scope)

# request.client is None for tests, so we need to fill in something here
Expand Down

0 comments on commit d3e820c

Please sign in to comment.