Function withErrorCaptureDialogService