fix invalid logging of js errors

Change-Id: I4bbd3c7d5c7fb5c92477190e558b91adf96954de
Reviewed-on: https://gerrit.instructure.com/39304
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>