mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Ignore duplicate error
This commit is contained in:
@@ -66,6 +66,12 @@ export const dnsMadeEasyInsertTxtRecord = async (
|
||||
(error.response?.data as { error?: string[] | string })?.error ||
|
||||
error.message ||
|
||||
"Unknown error";
|
||||
|
||||
if (error.status === 400 && error.message.includes("already exists")) {
|
||||
logger.info({ domain, value }, `Record already exists for domain: ${domain} and value: ${value}`);
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Error(typeof errorMessage === "string" ? errorMessage : String(errorMessage));
|
||||
}
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user