Greetings! I have not dug into the backend, but I believe I posted an enhancement request a while back about getting more granular output for developers. I thought I would offer some Python script that I have that creates more granular output and see if it is something you may be able to integrate/migrate to to allow for more granular error responses.
resource_star_check copy.txt
central_processing copy.txt
template copy.txt