javascript: fix on error constant names