mchades opened a new issue, #14039: URL: https://github.com/apache/gravitino/issues/14039
### Version main branch ### Describe what's wrong Renaming a fileset, model, policy, catalog, or metalake to an existing name is reported as an internal server error (HTTP 500). The same conflict in `ManagedTableOperations` is reported as an invalid argument (HTTP 400). These are name conflicts and should consistently return HTTP 409 with the corresponding `*AlreadyExistsException`, identifying the conflicting target name. The existing objects should remain unchanged. ### Error message and/or stacktrace The relational store raises `EntityAlreadyExistsException`, but the affected alter operations either propagate it without translation or wrap it in a generic exception. `ManagedTableOperations` wraps it in `IllegalArgumentException`. ### How to reproduce 1. Use the relational metadata store and create two objects of one affected type, named `source` and `target`, in the same namespace. 2. Rename `source` to `target` through the corresponding alter API. For tables, use a catalog backed by `ManagedTableOperations`. 3. Observe HTTP 500 (fileset/model/policy/catalog/metalake) or HTTP 400 (managed table), instead of HTTP 409. ### Additional context Tag rename conflicts already use `TagAlreadyExistsException`. Job template rename conflicts are tracked separately in #14017 and #14018. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
