Show Arvan DNS errors when adding a domain in super-admin.
Add-domain now reports dnsError from the API and documents that tenant records are written in Arvan automatically. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
c16ec3787b
commit
8e8929050e
@@ -851,6 +851,7 @@ export function BusinessesPage() {
|
||||
deploySlug?: string | null
|
||||
gitRepoUrl?: string | null
|
||||
provisionError?: string | null
|
||||
dnsError?: string | null
|
||||
}
|
||||
setData((prev) => {
|
||||
if (!prev) return prev
|
||||
@@ -875,12 +876,16 @@ export function BusinessesPage() {
|
||||
if (updated.provisionError) {
|
||||
showToast(`Domain updated to "${host}", but storefront setup failed.`, 'error')
|
||||
showToast(updated.provisionError, 'error')
|
||||
} else if (gitRepoUrl && updated.deploySlug) {
|
||||
}
|
||||
if (updated.dnsError) {
|
||||
showToast(`Domain updated to "${host}", but Arvan DNS failed.`, 'error')
|
||||
showToast(updated.dnsError, 'error')
|
||||
} else if (!updated.provisionError && gitRepoUrl && updated.deploySlug) {
|
||||
showToast(
|
||||
`Domain updated. Storefront deploy is ready on Websites.`,
|
||||
'success',
|
||||
)
|
||||
} else {
|
||||
} else if (!updated.provisionError) {
|
||||
showToast(`Domain updated to "${host}".`, 'success')
|
||||
}
|
||||
} else {
|
||||
@@ -895,6 +900,7 @@ export function BusinessesPage() {
|
||||
deploySlug?: string | null
|
||||
gitRepoUrl?: string | null
|
||||
provisionError?: string | null
|
||||
dnsError?: string | null
|
||||
}
|
||||
setData((prev) => {
|
||||
if (!prev) return prev
|
||||
@@ -921,12 +927,16 @@ export function BusinessesPage() {
|
||||
if (created.provisionError) {
|
||||
showToast(`Domain "${host}" added, but storefront setup failed.`, 'error')
|
||||
showToast(created.provisionError, 'error')
|
||||
} else if (gitRepoUrl && created.deploySlug) {
|
||||
}
|
||||
if (created.dnsError) {
|
||||
showToast(`Domain "${host}" added, but Arvan DNS failed.`, 'error')
|
||||
showToast(created.dnsError, 'error')
|
||||
} else if (!created.provisionError && gitRepoUrl && created.deploySlug) {
|
||||
showToast(
|
||||
`Domain "${host}" added. Storefront deploy is ready on Websites.`,
|
||||
'success',
|
||||
)
|
||||
} else {
|
||||
} else if (!created.provisionError) {
|
||||
showToast(`Domain "${host}" added.`, 'success')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user