Set custom status code on failed canAccessResource response