I have to agree with Rodger that you run the risk of the battery contact breaking off do to fatigue from being bent a couple times. I have done this kind of repair a few times in the past and found about a 50-50 average. I have also found that jewelers pilers is the best tool for this fix. I never thought of a hemostat but it could work too.
The ERROR 50 message probably has nothing to do with the bent pin.
I would stop trying to fix it. The damaged pin is one of the main + - battery contacts. If the camera is working, it means the battery is connected and the power is reaching the camera just fine. Trying to adjust the pin can cause it to break and render your camera useless.
The error is probably related to your pop up flash. Try using an external flash to see if you still have the same error message.
Does the 77D have the switch in the hot shoe that detects the presence of an auxiliary flash or other accessory installed in the shoe? Is the switch possibly stuck in the down position or is there any debris in the channel where the flash mounts?
12/05/2023: New firmware updates are available.
09/26/2023: New firmware updates are available.
08/18/2023: Canon EOS R5 C training series is released.
07/31/2023: New firmware updates are available.
05/18/2023: New firmware updates are available.
03/30/2023: New firmware updates are available.