Skip to content

Commit 24f04b1

Browse files
authored
Merge pull request #401 from cursion-dev/dev
fix: lighthouse logging cleanup
2 parents 92b935e + b790244 commit 24f04b1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/api/utils/lighthouse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ def lighthouse_api(self) -> dict:
212212
headers=headers
213213
)
214214

215-
print(res)
216-
print(res.status_code, res.text)
217-
218-
res_json = res.json()
215+
# print error if not 200
216+
if not str(res.status_code).startswith('2'):
217+
print(res.status_code, res.text)
219218

220219
# try to get just LH response
220+
res_json = res.json()
221221
res = res_json.get('lighthouseResult')
222222

223223
# return response

0 commit comments

Comments
 (0)