Skip to content

Conversation

@matteokosina
Copy link
Contributor

BEFORE STATE:

On re-upload a user is presented with a 500 Internal Server Error, the API-Server logs show

7:57AM DBG Sent artifact chunk host=<host> sent_bytes=231 service=api-server version=v0.6.0
7:57AM INF HTTP Request host=<host> ip=<ip> latency=278.280657 method=POST path=/artifact/upload service=api-server size=224 status=201 user_agent=bruno-runtime/2.14.2 version=v0.6.0
7:58AM DBG Authenticating user with BasicAuth host=<host> service=api-server user=<username> version=v0.6.0
7:58AM DBG Sent artifact chunk host=<host> sent_bytes=231 service=api-server version=v0.6.0
7:58AM ERR Failed to finalize artifact upload error="rpc error: code = AlreadyExists desc = Artifact already exists for storing artifact metadata" host=<host> service=api-server version=v0.6.0
7:58AM WRN HTTP Request host=<host> ip=<ip> latency=93.675282 method=POST path=/artifact/upload service=api-server size=-1 status=500 user_agent=bruno-runtime/2.14.2 version=v0.6.0

STATE NOW:

On re-upload a user is presented with a 409 Already exists error and an error description: An artifact already exists with this fully qualified name and version hash

@matteokosina matteokosina requested a review from habetuz January 13, 2026 08:28
@matteokosina matteokosina self-assigned this Jan 13, 2026
Copilot AI review requested due to automatic review settings January 13, 2026 08:28
@matteokosina matteokosina added the bug Something isn't working label Jan 13, 2026
@EnclaveAutomation
Copy link
Member

EnclaveAutomation commented Jan 13, 2026

All CI Checks Passed

All checks have passed successfully. Thank you for contributing to the project ✌🏼!


Details:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where re-uploading an existing artifact incorrectly returns a 500 Internal Server Error. The fix properly handles the gRPC AlreadyExists error by returning a 409 Conflict status with a descriptive error message instead.

Changes:

  • Added error handling to detect gRPC AlreadyExists errors during artifact upload
  • Returns HTTP 409 status code with descriptive message for duplicate artifact uploads
  • Maintains existing 500 error handling for other upload failures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants