diff --git a/packages/fdr-sdk/src/converters/db/convertAPIDefinitionToDb.ts b/packages/fdr-sdk/src/converters/db/convertAPIDefinitionToDb.ts index 3b115155fb..342cd7292b 100644 --- a/packages/fdr-sdk/src/converters/db/convertAPIDefinitionToDb.ts +++ b/packages/fdr-sdk/src/converters/db/convertAPIDefinitionToDb.ts @@ -694,7 +694,11 @@ class ApiDefinitionTransformationContext { } private getHost(url: string) { - const parsedBaseUrl = new URL(url); - return parsedBaseUrl.host; + try { + const parsedBaseUrl = new URL(url); + return parsedBaseUrl.host; + } catch (err) { + return ""; + } } }