Update apps.js to have cleaner errors