You can sue an insurance company for failing to defend you in a lawsuit. This is accomplished by the filing of a declaratory action (dec action). A lawyer can ask a judge to determine whether or not you were covered. If the judge determines that coverage was valid the insurance company is obligated to defend you per the terms of the policy. If they fail to do so than you would have a bad faith case against the insurance company.