According to Heim Korth in the book "The Final Frontiersman" I would follow the advise:
Before taking a handgun into bear country make sure that the front sight is filed off. Because it won't hurt so much when the bear shoves the gun up your arse.

On the other hand:
In a case of immediate emergency even the 357 Magnum might help:

https://www.fieldandstream.com/photos/gallery/hunting/2008/01/grizzly-attack-caught-camera/


Elmer Keith