mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-09 07:13:36 -05:00
[PR #819] [MERGED] Fix Submit Dialog Button Behavior with 500 Errors on Duplicate Names #794
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/moghtech/komodo/pull/819
Author: @MP-Tool
Created: 9/6/2025
Status: ✅ Merged
Merged: 9/7/2025
Merged by: @mbecker20
Base:
1.19.4← Head:fix/submit-dialog-button-behavior📝 Commits (5)
00388b9Implement enhanced error handling and messaging for resource creation2e67778Implement improved error handling for resource creation across alerter, build, and sync40ff9aeImplement error handling improvements for resource copying and validation feedbackec81518Adjust error handling for resource creation to distinguish validation errors from unexpected system errors0f36679Refactor resource creation error handling by removing redundant match statements and simplifying the error propagation in multiple API modules.📊 Changes
15 files changed (+62 additions, -104 deletions)
View changed files
📝
bin/core/src/api/write/action.rs(+2 -8)📝
bin/core/src/api/write/alerter.rs(+2 -8)📝
bin/core/src/api/write/build.rs(+2 -8)📝
bin/core/src/api/write/builder.rs(+2 -8)📝
bin/core/src/api/write/deployment.rs(+3 -12)📝
bin/core/src/api/write/procedure.rs(+2 -8)📝
bin/core/src/api/write/repo.rs(+2 -5)📝
bin/core/src/api/write/server.rs(+3 -8)📝
bin/core/src/api/write/stack.rs(+3 -8)📝
bin/core/src/api/write/sync.rs(+2 -12)📝
bin/core/src/resource/mod.rs(+7 -5)📝
bin/core/src/sync/execute.rs(+1 -0)📝
bin/core/src/sync/resources.rs(+1 -0)📝
frontend/src/components/layouts.tsx(+5 -2)📝
frontend/src/components/resources/common.tsx(+25 -12)📄 Description
Overview
Resolves issue #771 by implementing proper HTTP status codes and improving error handling for resource creation/copying operations.
Problem
Previously, duplicate name errors returned HTTP 500 (Internal Server Error) instead of appropriate status codes, causing:
Solution
Backend Changes
handle_resource_creation_error()function inbin/core/src/api/write/mod.rs409 Conflictfor duplicate names and busy resources400 Bad Requestfor validation errors (empty names, invalid ObjectIds, permission errors)500 Internal Server Erroronly for actual system errorsFrontend Changes
Impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.