mirror of
https://github.com/harness/drone.git
synced 2025-05-21 11:29:52 +08:00
fix: [AH-556] fix error on creation of duplicate artifact registry | Gitness (#3117)
* fix: [AH-556] Fix NilError Lint * fix: [AH-556] fix error on creation of duplicate artifact registry
This commit is contained in:
parent
df3342aefe
commit
ff1cbd654e
@ -91,7 +91,7 @@ func (c *APIController) CreateRegistry(
|
||||
registryID, err = c.createRegistryWithAudit(ctx, registry, session.Principal, string(parentRef))
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create registry: %w", err)
|
||||
return fmt.Errorf("%w", err)
|
||||
}
|
||||
|
||||
upstreamproxy.RegistryID = registryID
|
||||
@ -108,11 +108,11 @@ func (c *APIController) CreateRegistry(
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return throwCreateRegistry400Error(err), err
|
||||
return throwCreateRegistry400Error(err), nil //nolint:nilerr
|
||||
}
|
||||
upstreamproxyEntity, err := c.UpstreamProxyStore.Get(ctx, registryID)
|
||||
if err != nil {
|
||||
return throwCreateRegistry400Error(err), err
|
||||
return throwCreateRegistry400Error(err), nil //nolint:nilerr
|
||||
}
|
||||
|
||||
return artifact.CreateRegistry201JSONResponse{
|
||||
|
Loading…
Reference in New Issue
Block a user