Skip to content

Commit 5a701ea

Browse files
committed
Fix params method lookup
1 parent 04f6897 commit 5a701ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

newrelic/common/agent_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ def send_request(
602602
result = super().send_request(method=method, path=path, params=params, headers=headers, payload=payload)
603603

604604
# Check for the presence of agent_method to ensure this isn't an OTLP request
605-
agent_method = params.get("method", None)
605+
agent_method = params and params.get("method")
606606
if result[0] == 200 and agent_method:
607607
self.payload[agent_method] = json_decode(payload.decode("utf-8"))
608608

0 commit comments

Comments
 (0)