Skip to content

fix(auth): classify TOS bucket conflicts by error code - #171

Open
linhongyu510 wants to merge 1 commit into
volcengine:mainfrom
linhongyu510:fix/tos-bucket-error-classification
Open

fix(auth): classify TOS bucket conflicts by error code#171
linhongyu510 wants to merge 1 commit into
volcengine:mainfrom
linhongyu510:fix/tos-bucket-error-classification

Conversation

@linhongyu510

@linhongyu510 linhongyu510 commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Classify TOS bucket-creation conflicts by structured error code when publishing the AgentKit discovery document.

The previous implementation inspected exception message text for words such as Exist, Owned, or Conflict. This could suppress authentication, permission, or service errors whose messages happened to contain those words, then continue as if bucket creation had succeeded.

This change only tolerates BucketAlreadyExists and BucketAlreadyOwnedByYou. All other failures are wrapped in AuthError and stop publication.

Tests

  • both supported conflict codes continue to object upload
  • InvalidAccessKeyId is not swallowed
  • object upload is not attempted after authentication failure

AI assistance

Developed with AI assistance; the error boundary and tests were manually reviewed.

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.

1 participant