Skip to content

[Feature]: Map gRPC ALREADY_EXISTS to HTTP 409 Conflict #1356

Open
@krigol14

Description

@krigol14

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the Issue Tracker for a feature request that matches the one I want to file, without success.

Suggestion

Update the error mapping so that gRPC ALREADY_EXISTS corresponds to HTTP 409.

Summary
Errors with the gRPC status code ALREADY_EXISTS are currently being mapped to HTTP status code 500 (Internal Server Error). This was initially noted in PR #1353.

Problem
Mapping ALREADY_EXISTS to a 500 response is misleading, as it implies a server-side issue. A more appropriate mapping would be HTTP status code 409, which more accurately reflects the semantics of a resource already existing.

Considerations
This change is breaking, as it alters the HTTP response code returned by affected endpoints. It may impact clients that rely on the current 500 status and should therefore be introduced with proper versioning or communication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions