js: Configuration and Error handling