fix: [AH-420]: handle error (#2759)

* 







fix: [AH-420]: handle error
pull/3576/head
Shivakumar Ningappa 2024-10-23 06:41:02 +00:00 committed by Harness
parent c27a2f7201
commit e9f6f1228a
1 changed files with 8 additions and 1 deletions

View File

@ -41,8 +41,15 @@ func (c *APIController) ListArtifactLabels(
sortField: nil,
registryIDsParam: nil,
}
regInfo, _ := c.GetRegistryRequestInfo(
regInfo, err := c.GetRegistryRequestInfo(
ctx, *registryRequestParams)
if err != nil {
return artifact.ListArtifactLabels400JSONResponse{
BadRequestJSONResponse: artifact.BadRequestJSONResponse(
*GetErrorResponse(http.StatusBadRequest, err.Error()),
),
}, nil
}
space, err := c.SpaceStore.FindByRef(ctx, regInfo.ParentRef)
if err != nil {