Updated JS error reporting code
Merge branch 'dev'