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 9f22682 commit ecc97e0Copy full SHA for ecc97e0
internal/hooks/hookshttp/hookshttp.go
@@ -185,12 +185,12 @@ func (o *Dispatcher) runHTTPHook(
185
defer rsp.Body.Close()
186
187
switch rsp.StatusCode {
188
- case http.StatusOK, http.StatusNoContent, http.StatusAccepted:
+ case http.StatusNoContent:
189
+ return nil, nil
190
+
191
+ case http.StatusOK, http.StatusAccepted:
192
contentType := rsp.Header.Get("Content-Type")
193
if contentType == "" {
- if rsp.StatusCode == http.StatusNoContent {
- return nil, nil
- }
194
return nil, apierrors.NewBadRequestError(
195
apierrors.ErrorCodeHookPayloadInvalidContentType,
196
"Invalid Content-Type: Missing Content-Type header")
0 commit comments