I get asked all the time, “Bill, what about the City/County? They signed off on the inspection! Doesn’t that mean they’re liable if the work is defective?” Unfortunately, no. The City/County has a qualified immunity against being liable for doing its job badly.
If the City is so far out of line that it qualifies as “negligence,” i.e., you get hit by a City bus, then yes, you can sue the City. If the City or County breaches a contract with you, then yes, you can sue the City/County. If the inspector says he or she is going to fail your building because they disagree with your preferred Presidential candidate, then yes, you can sue the City/County.
But if the inspector shows up relatively sober, has their clipboard, and at least claps eyes on several of the things they’re supposed to sign off on, then there’s no use trying to sue them.
Hope that helps.