Skip to content

Commit c792fcd

Browse files
committed
MILAB-3485: pl-deployments: local: better errors
1 parent ed8a31d commit c792fcd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/ready-keys-start.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@milaboratories/pl-deployments': patch
3+
---
4+
5+
pl-deployments: built-in: better errors

lib/node/pl-deployments/src/local/trace.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export async function withTrace<T>(
2424
const result = await fn((k: string, v: any) => trace(t, k, v), t);
2525
return result;
2626
} catch (e: any) {
27-
logger.error(`error ${e} while doing traced operation, state: ${JSON.stringify(t)}`);
28-
throw e;
27+
const msg = `${e} while doing traced operation, state: ${JSON.stringify(t)}`;
28+
logger.error(msg);
29+
throw new Error(msg);
2930
}
3031
}

0 commit comments

Comments
 (0)