Because of a lawsuit, we were required to file for bankruptcy (chapter 7). We made a hardship loan from my wife's 401K plan. Doesn't this qualify for a hardship loan?

I have read that you may not have to pay taxes on money borrowed from a 401K plan if it was due to a hardship.