Skip to content

Commit

Permalink
Make unhandled webhook events return 200 instead of 501 (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmisasi committed Apr 13, 2022
1 parent 8a5a54d commit a986bb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/http.go
Expand Up @@ -231,7 +231,7 @@ func (p *Plugin) handleWebhook(w http.ResponseWriter, r *http.Request) {
}

if webhook.Event != zoom.EventTypeMeetingEnded {
w.WriteHeader(http.StatusNotImplemented)
w.WriteHeader(http.StatusOK)
return
}

Expand Down
2 changes: 1 addition & 1 deletion server/plugin_test.go
Expand Up @@ -92,7 +92,7 @@ func TestPlugin(t *testing.T) {
},
"ValidStartedWebhookRequest": {
Request: validStartedWebhookRequest,
ExpectedStatusCode: http.StatusNotImplemented,
ExpectedStatusCode: http.StatusOK,
HasPermissionToChannel: true,
},
"NoSecretWebhookRequest": {
Expand Down

0 comments on commit a986bb4

Please sign in to comment.