mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
chore: improve error logs (#10933)
Signed-off-by: Prajilesh <[email protected]> Signed-off-by: Prajilesh <[email protected]>
This commit is contained in:
Vendored
+4
-4
@@ -382,7 +382,7 @@ func (c *liveStateCache) getCluster(server string) (clustercache.ClusterCache, e
|
||||
|
||||
cluster, err := c.db.GetCluster(context.Background(), server)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("error getting cluster: %w", err)
|
||||
}
|
||||
|
||||
if !c.canHandleCluster(cluster) {
|
||||
@@ -456,11 +456,11 @@ func (c *liveStateCache) getCluster(server string) (clustercache.ClusterCache, e
|
||||
func (c *liveStateCache) getSyncedCluster(server string) (clustercache.ClusterCache, error) {
|
||||
clusterCache, err := c.getCluster(server)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("error getting cluster: %w", err)
|
||||
}
|
||||
err = clusterCache.EnsureSynced()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("error synchronizing cache state : %w", err)
|
||||
}
|
||||
return clusterCache, nil
|
||||
}
|
||||
@@ -594,7 +594,7 @@ func (c *liveStateCache) watchSettings(ctx context.Context) {
|
||||
func (c *liveStateCache) Init() error {
|
||||
cacheSettings, err := c.loadCacheSettings()
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("error loading cache settings: %w", err)
|
||||
}
|
||||
c.cacheSettings = *cacheSettings
|
||||
return nil
|
||||
|
||||
@@ -20,7 +20,7 @@ type repoAsCredentials struct {
|
||||
func (r *repoAsCredentials) GetAuthSecret(ctx context.Context, secretName string) (*github_app_auth.Authentication, error) {
|
||||
repo, err := r.GetRepoCredsBySecretName(ctx, secretName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("error getting creds for %s: %w", secretName, err)
|
||||
}
|
||||
if repo == nil || repo.GithubAppPrivateKey == "" {
|
||||
return nil, fmt.Errorf("no github app found for %s", secretName)
|
||||
|
||||
Reference in New Issue
Block a user