Skip to content

Conversation

@hexaforce
Copy link
Contributor

@hexaforce hexaforce commented Sep 3, 2025

Overview

Add permission-error handling for GCS file downloads.

What I've done

Investigate whether permission-related errors occur when saving files to GCS in visualizer and visualizer-internal-api.

	if err != nil {
		if errors.Is(err, storage.ErrObjectNotExist) {
+			if OK := f.exists(ctx, bucket, filename); OK {
+				return nil, errors.New("no read permission")
+			}
			return nil, rerror.ErrNotFound
		}
		log.Errorfc(ctx, "gcs: generation read err: %+v\n", err)
		return nil, rerror.ErrInternalByWithContext(ctx, err)
	}

What I haven't done

How I tested

Which point I want you to review particularly

Memo

@hexaforce hexaforce force-pushed the fix/corrupted-project-file branch from 310f6c9 to 13577c2 Compare September 3, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants