Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit 1ed6108

Browse files
committed
fix: don't require event hub
1 parent 0f9aa53 commit 1ed6108

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/eventhub.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ export async function setup() {
1010
"eventHubAccountConnectionString"
1111
const connStrSecret = await secrets.getSecret(connectionStringSecretName)
1212
const connStr = connStrSecret.value
13-
if (!connStr) throw new Error("event hub connection string is empty")
13+
if (!connStr) {
14+
console.log(
15+
"no EventHub connection string secret, skipping registration"
16+
)
17+
return
18+
}
1419

1520
const producer = new EventHubProducerClient(connStr, "messages")
1621
registerMessageSink({

0 commit comments

Comments
 (0)