Skip to content

Commit 5e15775

Browse files
save msg on catch
1 parent 6e6396f commit 5e15775

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/registry/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ export default function registry(inputOptions: Input) {
4545
};
4646

4747
const start = async (
48-
callback: Callback<{ app: express.Express; server: http.Server }>
48+
callback: (
49+
err: unknown,
50+
data: { app: express.Express; server: http.Server }
51+
) => void
4952
) => {
5053
// eslint-disable-next-line no-console
5154
const ok = (msg: string) => console.log(colors.green(msg));
@@ -98,7 +101,7 @@ export default function registry(inputOptions: Input) {
98101
callback(error, undefined as any);
99102
});
100103
} catch (err) {
101-
callback(err as Error, undefined as any);
104+
callback((err as any)?.msg || err, undefined as any);
102105
}
103106
};
104107

0 commit comments

Comments
 (0)