You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/resources/webhooks.ts
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -19,28 +19,6 @@ export class Webhooks extends APIResource {
19
19
returnJSON.parse(payload)asUnwrapWebhookEvent;
20
20
}
21
21
22
-
privatevalidateSecret(secret: string|null|undefined): asserts secret is string{
23
-
if(typeofsecret!=='string'||secret.length===0){
24
-
thrownewError(
25
-
`The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function`,
@@ -137,6 +115,28 @@ export class Webhooks extends APIResource {
137
115
'The given webhook signature does not match the expected signature',
138
116
);
139
117
}
118
+
119
+
#validateSecret(secret: string|null|undefined): asserts secret is string{
120
+
if(typeofsecret!=='string'||secret.length===0){
121
+
thrownewError(
122
+
`The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function`,
0 commit comments