mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 11:27:47 +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.response?.data as { error?: string[] | string })?.error ||
|
||||||
error.message ||
|
error.message ||
|
||||||
"Unknown error";
|
"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 new Error(typeof errorMessage === "string" ? errorMessage : String(errorMessage));
|
||||||
}
|
}
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
Reference in New Issue
Block a user