Add dark-mode business logo, payment order steps, and Arvan DNS diagnostics.

Store logo_dark_media_id on businesses, expose logoDarkUrl on tenant/website APIs, prepend awaiting-payment steps to order workflows, and surface clearer Arvan API network errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-26 00:21:46 +03:30
co-authored by Cursor
parent e942348b1d
commit 6ce6f959ac
17 changed files with 237 additions and 29 deletions
+26 -2
View File
@@ -226,9 +226,33 @@ export class ArvanDnsService {
'Content-Type': 'application/json',
},
body: body === undefined ? undefined : JSON.stringify(body),
signal: AbortSignal.timeout(20_000),
});
} catch {
throw new ServiceUnavailableException('Could not reach ArvanCloud DNS API');
} catch (err) {
const cause =
err && typeof err === 'object' && 'cause' in err
? (err as { cause?: unknown }).cause
: undefined;
const detail =
(cause &&
typeof cause === 'object' &&
'code' in cause &&
typeof (cause as { code: unknown }).code === 'string' &&
(cause as { code: string }).code) ||
(cause &&
typeof cause === 'object' &&
'message' in cause &&
typeof (cause as { message: unknown }).message === 'string' &&
(cause as { message: string }).message) ||
(err instanceof Error ? err.message : null);
this.logger.warn(
`Arvan DNS request failed ${method} ${path}${detail ? `: ${detail}` : ''}`,
);
throw new ServiceUnavailableException(
detail
? `Could not reach ArvanCloud DNS API (${detail})`
: 'Could not reach ArvanCloud DNS API',
);
}
const text = await response.text().catch(() => '');