Skip to content

Conversation

corylanou
Copy link
Collaborator

Summary

Standardizes error message prefixes across all storage backend replica clients for consistency and better debugging experience, as suggested in issue #710.

Changes Made

Google Storage Client (gs/replica_client.go)

  • ✅ Added gs: prefix to 2 error messages

SFTP Client (sftp/replica_client.go)

  • ✅ Added sftp: prefix to 9 error messages

S3 Client (s3/replica_client.go)

  • ✅ Added s3: prefix to 11 error messages (some already had the prefix)

File Client (file/replica_client.go)

  • ✅ No changes needed - uses standard file operation errors

Benefits

  • Consistent error formatting across all storage backends
  • Easier identification of which storage backend produces errors in logs
  • Better debugging experience for users monitoring replication
  • Follows existing patterns established by S3 and ABS clients

Examples

Before:

cannot delete object "path/file.ltx": connection timeout
upload to s3://bucket/file.ltx: access denied

After:

gs: cannot delete object "path/file.ltx": connection timeout
s3: upload to s3://bucket/file.ltx: access denied

Test Results

  • ✅ All tests pass (go test ./...)
  • ✅ No vet issues (go vet ./...)
  • ✅ No staticcheck issues (staticcheck ./...)
  • ✅ Pre-commit hooks pass

Closes #710

🤖 Generated with Claude Code

This commit standardizes error message prefixes across all storage backend
replica clients for consistency and better debugging experience.

Changes:
- Google Storage (gs): Added "gs:" prefix to 2 error messages
- SFTP: Added "sftp:" prefix to 9 error messages
- S3: Added "s3:" prefix to 11 error messages

Benefits:
- Consistent error formatting across all storage backends
- Easier identification of which storage backend produces errors in logs
- Better debugging experience for users

Closes #710

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@corylanou corylanou requested a review from benbjohnson August 14, 2025 22:38
@corylanou corylanou merged commit b9e1ebf into main Aug 15, 2025
16 checks passed
@corylanou corylanou deleted the fix-710-standardize-error-prefixes branch August 15, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standardize error message prefixes across all replica clients
2 participants