We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a31ae7d commit 88b960aCopy full SHA for 88b960a
packages/core/src/mongoMeasurement.ts
@@ -1,4 +1,4 @@
1
-import { MongoTracer } from "./generated/openapi";
+import { ApiError, MongoTracer } from "./generated/openapi";
2
3
export class MongoMeasurement {
4
private tracerClient: MongoTracer | undefined;
@@ -42,7 +42,15 @@ export class MongoMeasurement {
42
43
public async terminate() {
44
if (this.tracerClient !== undefined) {
45
- return await this.tracerClient.instrumentation.terminate();
+ try {
46
+ return await this.tracerClient.instrumentation.terminate();
47
+ } catch (e) {
48
+ // TODO handle terminate killing the server instead of returning a response first
49
+ if (e instanceof ApiError) {
50
+ console.error("Terminate failed with error");
51
+ console.log(e.body);
52
+ }
53
54
}
55
56
0 commit comments