remove if (!err) from app.onerror

we assert instanceof Error right below