in jetbrains-core/src/software/aws/toolkits/jetbrains/services/sqs/CreateQueueDialog.kt [51:75]
override fun doOKAction() {
if (!isOKActionEnabled) {
return
}
setOKButtonText(message("general.create_in_progress"))
isOKActionEnabled = false
coroutineScope.launch {
try {
createQueue()
withContext(getCoroutineUiContext()) {
close(OK_EXIT_CODE)
}
project.refreshAwsTree(SqsResources.LIST_QUEUE_URLS)
SqsTelemetry.createQueue(project, Result.Succeeded, if (view.fifoType.isSelected) SqsQueueType.Fifo else SqsQueueType.Standard)
} catch (e: Exception) {
// API only throws QueueNameExistsException if the request includes attributes whose values differ from those of the existing queue.
LOG.warn(e) { message("sqs.create.queue.failed", queueName()) }
setErrorText(e.message)
setOKButtonText(message("sqs.create.queue.create"))
isOKActionEnabled = true
SqsTelemetry.createQueue(project, Result.Failed, if (view.fifoType.isSelected) SqsQueueType.Fifo else SqsQueueType.Standard)
}
}
}