There was an error while loading. Please reload this page.
2 parents 92b935e + b790244 commit 24f04b1Copy full SHA for 24f04b1
1 file changed
app/api/utils/lighthouse.py
@@ -212,12 +212,12 @@ def lighthouse_api(self) -> dict:
212
headers=headers
213
)
214
215
- print(res)
216
- print(res.status_code, res.text)
217
-
218
- res_json = res.json()
+ # print error if not 200
+ if not str(res.status_code).startswith('2'):
+ print(res.status_code, res.text)
219
220
# try to get just LH response
+ res_json = res.json()
221
res = res_json.get('lighthouseResult')
222
223
# return response
0 commit comments