throw error instead return null so it can be caught by koa