feat: handle empty response from webhook endpoint
This commit is contained in:
parent
41468b5b60
commit
70ea463f60
|
@ -97,9 +97,11 @@ func TestEndpointResolver(ctx context.Context, params model.TestEndpointRequest)
|
|||
}
|
||||
|
||||
response := map[string]interface{}{}
|
||||
if err := json.Unmarshal(body, &response); err != nil {
|
||||
log.Debug("error un-marshalling response: ", err)
|
||||
return nil, err
|
||||
if string(body) != "" {
|
||||
if err := json.Unmarshal(body, &response); err != nil {
|
||||
log.Debug("error un-marshalling response: ", err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
statusCode := int64(resp.StatusCode)
|
||||
|
|
Loading…
Reference in New Issue
Block a user