Subcontractors who worked for Great Plains Pipeline Construction sued Northwest Pipeline Corporation (NWP) for unpaid work after the general contractor went bankrupt. The Idaho Supreme Court ruled that NWP cannot be forced to pay the subcontractors' attorney fees because there was no direct contract between NWP and the subs—only between the subs and GPPC, and between GPPC and NWP. This means subcontractors cannot recover attorney fees from the project owner when suing through a general contractor middleman.
You cannot recover attorney fees from a project owner unless you have a direct contract with them. Going through a general contractor breaks the chain.
If your general contractor goes bankrupt, suing the project owner becomes harder and more expensive because you lose fee-shifting rights.