Skip to content

Commit

Permalink
Fix the logging for the REST client (#3289)
Browse files Browse the repository at this point in the history
  • Loading branch information
panh99 authored Apr 18, 2024
1 parent 4a1d4ac commit 55d28e4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/py/flwr/client/rest_client/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ def ping() -> None:
log(
WARN,
"[Node] POST /%s: missing header `Content-Type`",
PATH_PULL_TASK_INS,
PATH_PING,
)
return
if res.headers["content-type"] != "application/protobuf":
log(
WARN,
"[Node] POST /%s: header `Content-Type` has wrong value",
PATH_PULL_TASK_INS,
PATH_PING,
)
return

Expand Down Expand Up @@ -223,14 +223,14 @@ def create_node() -> None:
log(
WARN,
"[Node] POST /%s: missing header `Content-Type`",
PATH_PULL_TASK_INS,
PATH_CREATE_NODE,
)
return
if res.headers["content-type"] != "application/protobuf":
log(
WARN,
"[Node] POST /%s: header `Content-Type` has wrong value",
PATH_PULL_TASK_INS,
PATH_CREATE_NODE,
)
return

Expand Down Expand Up @@ -277,14 +277,14 @@ def delete_node() -> None:
log(
WARN,
"[Node] POST /%s: missing header `Content-Type`",
PATH_PULL_TASK_INS,
PATH_DELETE_NODE,
)
return
if res.headers["content-type"] != "application/protobuf":
log(
WARN,
"[Node] POST /%s: header `Content-Type` has wrong value",
PATH_PULL_TASK_INS,
PATH_DELETE_NODE,
)

# Cleanup
Expand Down

0 comments on commit 55d28e4

Please sign in to comment.