Skip to content

Commit 8071637

Browse files
committed
Make TypeScript happy about the type in catch clauses.
1 parent b03e59b commit 8071637

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export let formatUsingValidBscNativePath = (
117117
} catch (e) {
118118
return {
119119
kind: "error",
120-
error: e.message,
120+
error: e instanceof Error ? e.message : String(e),
121121
};
122122
} finally {
123123
// async close is fine. We don't use this file name again
@@ -200,7 +200,7 @@ export let createInterfaceFileUsingValidBscExePath = (
200200
} catch (e) {
201201
return {
202202
kind: "error",
203-
error: e.message,
203+
error: e instanceof Error ? e.message : String(e),
204204
};
205205
}
206206
};

0 commit comments

Comments
 (0)