catchpoint/WebPageTest.api-nodejs

Missing context on errors

mkreidenweis opened this issue · 0 comments

Hi, we currently experience an issue with sitespeed.io, which is using webpagetest-api to drive WPT:
sitespeedio/sitespeed.io#1928

Unfortunately the error coming from webpagetest-api gives practically no context on where the error happened.

Could you maybe add a little more context to errors returned from webpagetest-api?

From what I can see it shouldn't be hard to add e.g. pathname to the err somehow here:
https://github.com/marcelduran/webpagetest-api/blob/6bac270b59c44f1f4841231db14c16b8544e44ca/lib/webpagetest.js#L228

I'm not quite sure how the WPTAPIError is supposed to be used though and how I would integrated the new behavior into your test suite.