[NEXUS-6072] Refactor internal capability reference statuses & error handling

Signed-off-by: Alin Dreghiciu <adreghiciu@gmail.com>