Skip to content

Commit 3bd2fea

Browse files
committed
Add a message for _log.exception()
Otherwise it complains about the required positional argument
1 parent 94cc969 commit 3bd2fea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/activator/activator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,9 @@ def next_visit_handler() -> tuple[str, int]:
347347
try:
348348
try:
349349
expected_visit = parse_next_visit(flask.request)
350-
except ValueError as msg:
351-
_log.exception()
352-
return f"Bad Request: {msg}", 400
350+
except ValueError as e:
351+
_log.exception("Bad Request: %s", e)
352+
return f"Bad Request: {e}", 400
353353
process_visit(expected_visit)
354354
return "Pipeline executed", 200
355355
except GracefulShutdownInterrupt:
@@ -524,7 +524,7 @@ def process_visit(expected_visit: FannedOutVisit):
524524

525525

526526
def invalid_visit(e: InvalidVisitError) -> tuple[str, int]:
527-
_log.exception()
527+
_log.exception("Invalid visit: %s", e)
528528
return f"Cannot process visit: {e}.", 422
529529

530530

0 commit comments

Comments
 (0)