instead of console.error we should `throw`