nit: just use `function ErrorDialog(errorName, opts) {`