Skip to content

Commit bc0bc2a

Browse files
authored
Merge pull request #6332 from cloudflare/ketan/dyworker-startup
Skip logging script startup exceptions for dynamic workers
2 parents 92a4e57 + 0c21b29 commit bc0bc2a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.opencode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"dependencies": {
3-
"@opencode-ai/plugin": "1.2.26"
3+
"@opencode-ai/plugin": "1.2.27"
44
}
55
}

src/workerd/io/worker.c++

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,11 @@ void reportStartupError(kj::StringPtr id,
314314
span.addLog(kj::systemPreciseCalendarClock().now(), "exception"_kjc,
315315
kj::ConstString(
316316
kj::str("script startup threw exception", id, description, trace)));
317-
KJ_LOG(ERROR, "script startup threw exception", id, description, trace);
318317
if (isDynamicWorker) {
319318
// Rethrow the tunneled JSG exception so it converts back to a JS Error.
320319
kj::throwFatalException(kj::cp(KJ_ASSERT_NONNULL(permanentException)));
321320
} else {
321+
KJ_LOG(ERROR, "script startup threw exception", id, description, trace);
322322
KJ_FAIL_REQUIRE("script startup threw exception");
323323
}
324324
}

0 commit comments

Comments
 (0)