diff --git a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx index 15387a935c6..8df89e74b80 100644 --- a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx +++ b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx @@ -254,8 +254,9 @@ export const CreateBranchModal = () => { if (form.getValues('gitBranchName') !== branchName) return setIsGitBranchValid(false) form.setError('gitBranchName', { - ...error, - message: `Unable to find branch "${branchName}" in ${repoOwner}/${repoName}`, + message: + error?.message ?? + `Unable to find branch "${branchName}" in ${repoOwner}/${repoName}`, }) }, }