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