Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cns/restserver/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,10 @@ func (service *HTTPRestService) publishNetworkContainer(w http.ResponseWriter, r
returnCode = types.UnsupportedVerb
}

if returnCode != 0 {
publishStatusCode = http.StatusInternalServerError
}

// create a synthetic response from NMAgent so that clients that previously
// relied on its presence can continue to do so.
publishResponseBody := fmt.Sprintf(`{"httpStatusCode":"%d"}`, publishStatusCode)
Expand Down Expand Up @@ -1350,6 +1354,10 @@ func (service *HTTPRestService) unpublishNetworkContainer(w http.ResponseWriter,
returnCode = types.UnsupportedVerb
}

if returnCode != 0 {
unpublishStatusCode = http.StatusInternalServerError
}

// create a synthetic response from NMAgent so that clients that previously
// relied on its presence can continue to do so.
unpublishResponseBody := fmt.Sprintf(`{"httpStatusCode":"%d"}`, unpublishStatusCode)
Expand Down