X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=servicemanager%2Finternal%2Fpublishserviceapi%2Ftypeupdate.go;h=e8a1f9ca40b13ae3a4560211d4943a4caa7d9a61;hb=822868729fe2af05b983f1fa16546bbcbfa2b465;hp=451f54b1034dfe9c270c262f48944530ee0630df;hpb=f2adad008c37b48e3386dfb7cf3949d7175f96b0;p=nonrtric%2Fplt%2Fsme.git diff --git a/servicemanager/internal/publishserviceapi/typeupdate.go b/servicemanager/internal/publishserviceapi/typeupdate.go index 451f54b..e8a1f9c 100644 --- a/servicemanager/internal/publishserviceapi/typeupdate.go +++ b/servicemanager/internal/publishserviceapi/typeupdate.go @@ -145,7 +145,8 @@ func (sd *ServiceAPIDescription) createKongRoute( if resp.StatusCode() == http.StatusCreated { log.Infof("kong route %s created successfully", routeName) } else { - err = fmt.Errorf("the Kong service already exists. Status code: %d", resp.StatusCode()) + log.Debugf("kongRoutesURL %s", kongRoutesURL) + err = fmt.Errorf("error creating Kong route. Status code: %d", resp.StatusCode()) log.Error(err.Error()) log.Errorf("response body: %s", resp.Body()) return resp.StatusCode(), err @@ -237,7 +238,7 @@ func (sd *ServiceAPIDescription) createKongService(kongControlPlaneURL string, k } else if resp.StatusCode() == http.StatusConflict { log.Errorf("kong service already exists. Status code: %d", resp.StatusCode()) err = fmt.Errorf("service with identical apiName is already published") // for compatibilty with Capif error message on a duplicate service - statusCode = http.StatusForbidden // for compatibilty with the spec, TS29222_CAPIF_Publish_Service_API + statusCode = http.StatusForbidden // for compatibilty with the spec, TS29222_CAPIF_Publish_Service_API } else { err = fmt.Errorf("error creating Kong service. Status code: %d", resp.StatusCode()) } @@ -350,6 +351,7 @@ func (sd *ServiceAPIDescription) deleteKongRoute(kongControlPlaneURL string, cli if resp.StatusCode() == http.StatusNoContent { log.Infof("kong route %s deleted successfully", routeName) } else { + log.Debugf("kongRoutesURL: %s", kongRoutesURL) log.Errorf("error deleting Kong route. Status code: %d", resp.StatusCode()) log.Errorf("response body: %s", resp.Body()) return resp.StatusCode(), err @@ -386,6 +388,7 @@ func (sd *ServiceAPIDescription) deleteKongService(kongControlPlaneURL string, s if resp.StatusCode() == http.StatusNoContent { log.Infof("kong service %s deleted successfully", serviceName) } else { + log.Debugf("kongServicesURL: %s", kongServicesURL) log.Errorf("deleting Kong service, status code: %d", resp.StatusCode()) log.Errorf("response body: %s", resp.Body()) }