once you eliminate the asynchronous part of this, I think you can move this to showMessageError and make it more generic.

Only the "confirmCallback" could be an option.

I'm also wondering whether moving showMessageError in its own JS file could be a good idea. `ErrorDialog.show`. But maybe for another bug?