2 reasons:
a. Faulty wiring sensor that is attached to handbrake. DIY: remove
console box. You will see some wiring attached to the handbrake
level. It may be loose or disconnected.
b. Your brake fluid is low. Check your brake fluid level at the
engine bay. Could be due to leaking brake hose which will lead to
brake failure. Better get it fix soon.
Check point b first. Mostly likely casue.
Cheers!