GitLab Pipelines Merge stage

Im new on Devops. Have created merge job into gitlab pipeline. The idea is to Development branch is the same as QA branch. So when the pipeline is running, my job clones my repository, after that merges branch Development into branch QA and pushes changes back to my repository. Everything is working, but the question is - if there is conflict in merging, and branches is not merged, the pipeline didn’t fails, the job is successful anyway. I want to know the way, how can I make the pipeline merge job fail if the branch merging is not succesfull. Sorry, if this is dummy question, but would be nice if someone can help me.