Skip to content

Commit 37e69e1

Browse files
authored
fix: accept apiDevserverUrl with non-ok response (#737)
1 parent 1fff64f commit 37e69e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/msha/handlers/function.handler.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@ async function resolveLocalhostByFetching(url: string) {
6363
.then((response) => {
6464
if (response.ok || response.redirected) {
6565
logger.silly(`Fetch ${Url} successfully`);
66-
return Url;
6766
} else {
68-
logger.silly(`Fetch ${Url} failed with status ${response.status} ${response.statusText}`);
69-
throw new Error(`Fetch ${Url} failed with status ${response.status} ${response.statusText}`);
67+
logger.warn(`Fetch ${Url} with status ${response.status} ${response.statusText}`);
7068
}
69+
return Url;
7170
})
7271
.catch((err) => {
7372
logger.silly(`Could not fetch ${Url}`);

0 commit comments

Comments
 (0)