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:
co-authored by
Cursor
parent
e942348b1d
commit
6ce6f959ac
@@ -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(() => '');
|
||||
|
||||
Reference in New Issue
Block a user