mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 14:19:11 +03:00
merge mutation copy
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user