Skip to content

Commit

Permalink
fix(fdr): dont fail hard on bad server urls
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Oct 30, 2024
1 parent 1cc3134 commit 833bdba
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
}
}
}

0 comments on commit 833bdba

Please sign in to comment.