adjust use of `dialog` for new error handling method