Skip to content

Commit 228d64c

Browse files
authored
Update send.py
Load the awaited text as JSON and pull from there, instead of referencing the coroutine .json() object directly.
1 parent 1125097 commit 228d64c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lightbeam/send.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ async def do_post(self, endpoint, file_name, data, client, line, hash):
174174

175175
# warn about errors
176176
if response.status not in [ 200, 201 ]:
177-
message = str(response.status) + ": " + util.linearize(response.json().get("message"))
177+
message = str(response.status) + ": " + util.linearize(json.loads(body).get("message"))
178178

179179
# update run metadata...
180180
failed_statuses_dict = self.metadata["resources"][endpoint].get("failed_statuses", {})

0 commit comments

Comments
 (0)