[#5896] Improved error handling of missing trees and blob prev_commit context

Signed-off-by: Cory Johns <johnsca@geek.net>