Skip to content

Commit f16ebee

Browse files
authored
Merge pull request #2587 from crStiv/fix
feat: Add logging for unexpected header keys in Synapse
2 parents 229a11e + 42032bc commit f16ebee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bittensor/core/synapse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# Copyright © 2024 Opentensor Foundation
33
#
44
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
5-
# documentation files (the Software), to deal in the Software without restriction, including without limitation
5+
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
66
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
77
# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
88
#
99
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1010
# the Software.
1111
#
12-
# THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
12+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1313
# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1414
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1515
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
@@ -806,7 +806,7 @@ def parse_headers_to_inputs(cls, headers: dict) -> dict:
806806
logging.error(f"Error while parsing 'input_obj' header {key}: {e}")
807807
continue
808808
else:
809-
pass # TODO: log unexpected keys
809+
logging.warning(f"Unexpected header key encountered: {key}")
810810

811811
# Assign the remaining known headers directly
812812
inputs_dict["timeout"] = headers.get("timeout", None)

0 commit comments

Comments
 (0)