Koa clustering and domain-based error handling utility