Skip to content

Commit fbb8771

Browse files
ekalosaktaeold
andauthored
fix: Badly formatted log messages in private/util.py (#140)
Co-authored-by: Daniel Lee <[email protected]>
1 parent 89cadc1 commit fbb8771

File tree

1 file changed

+3
-3
lines changed
  • src/firebase_functions/private

1 file changed

+3
-3
lines changed

src/firebase_functions/private/util.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _on_call_valid_body(request: _Request) -> bool:
123123
}
124124
if len(extra_keys) != 0:
125125
_logging.warning(
126-
"Request body has extra fields: ",
126+
"Request body has extra fields: %s",
127127
"".join(f"{key}: {value}," for (key, value) in extra_keys.items()),
128128
)
129129
return False
@@ -156,7 +156,7 @@ def _on_call_valid_content_type(request: _Request) -> bool:
156156

157157
# Check that the Content-Type is JSON.
158158
if content_type.lower() != "application/json":
159-
_logging.warning("Request has incorrect Content-Type.", content_type)
159+
_logging.warning("Request has incorrect Content-Type: %s", content_type)
160160
return False
161161

162162
return True
@@ -273,7 +273,7 @@ def on_call_check_tokens(request: _Request,) -> _OnCallTokenVerification:
273273
errs.append(("Auth token was rejected.", log_payload))
274274

275275
if len(errs) == 0:
276-
_logging.info("Callable request verification passed", log_payload)
276+
_logging.info("Callable request verification passed: %s", log_payload)
277277
else:
278278
_logging.warning(f"Callable request verification failed: ${errs}",
279279
log_payload)

0 commit comments

Comments
 (0)