merge mutation copy

This commit is contained in:
Saxon Fletcher committed 2025-06-20 14:34:21 +10:00
1 parent eb07e7786c
commit c575342591
1 file changed
-6
@@ -83,14 +83,8 @@ export const useBranchMergeMutation = ({
},
async onError(data, variables, context) {
if (onError === undefined) {
// Backend currently returns "push" errors for merge operations due to internal routing
let errorMessage = data.message || 'Unknown error occurred'
// Replace "push" with "merge" in error messages since we're doing a merge operation
if (errorMessage.includes('failed to push branch')) {
errorMessage = errorMessage.replace('failed to push branch', 'failed to merge branch')
}
toast.error(`Failed to merge branch: ${errorMessage}`)
} else {
onError(data, variables, context)