[core][js] capitalization for errors