I have had the same problem with my 2012 Leaf this past summer.
Back in July 2018 my parking brake failed but luckily it was in the disengaged mode. I continued driving until I could gather up service information and diagnostic tool (leafspypro).
I'm a pretty handy guy,.. but was intimidated by 95 pages of parking brake trouble shooting and repair information in the service manual and it seems you have to have another dealer computer program called "consult" dig into other module testing.
So I finally got down to doing something about it this week. Took the dust and spray cover of the bottom of the car and checked the Actuator connector. It was full of water! (its been a dry summer and I'm sure I have never driven the car through any deep water). After a number of times banging out water and using a hair drier and contact cleaner I could still not get any action on the Actuator.
The next day I put 12v directly on the power supply pins and got no effect, so I took the Actuator out and opened it up, there was about 4 spoonfuls of water in the gearcase and motor and the motor seized. Luckily the motor wasn't frozen too bad and was able to get everything dried out and freed up. Tested it on the bench and seemed to work. Installed it back in the car. Used the "Leafspy" to clear out the DTC codes and the the parking brake seems to operate normally again. Big smile on my face, I was not looking forward to a heafty dealer repair bill like the forums were indicating. Actual repair cost to me $0 other than buying the diagnostic program and wi-fi connector.
It would appear to me that the two weak links in this system are a poor quality waterproof connector to the Actuator and the brake release cable that comes down from the trunk compartment, it had water in it somehow too! Will watch for recurrence but hopefully I have sealed things up well enough or maybe someone else in the family did submerge it and can't remember.
If your parking brake acts up, look for water in these areas. Could save you a big repair bill.