Skip to content

Commit 2dca70d

Browse files
committed
small improvement to exception handling
1 parent 578a988 commit 2dca70d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/exception_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ async def request_validation_exception_handler(
1616
"""
1717
method = request.get('method', 'GET')
1818
query_string = request['query_string'].decode()
19-
path_with_query = request['path'] + ('?' + query_string if query_string else '')
19+
path_with_query = f'{request["path"]}?{query_string}' if query_string else request['path']
2020
logger.info('request validation exception', method=method, path_with_query=path_with_query, detail=exc.errors())
2121
return await _request_validation_exception_handler(request, exc)

0 commit comments

Comments
 (0)