> Which certainly made me shit myself, briefly.

Can you sue companies for inducing such anxiety?

IANAL, but I can probably imagine a case being made if a person really got so stressed that for example any health condition got invoked from the stress. It might be up to the lawyer to explain how exactly the service caused the stress and its direct relation to health condition though and up to the judge.

but I suppose that there might be some terms of conditions within using github (ahem Microsoft) that you can probably not sue them for something like this.

It really depends upon the severity of situation (imo)

For example, if a person had any heart condition and they got so stressed because of an error at github (which to be fair, I can understand the stress part, imagine losing some part of your software because it was on github and the amount of direct damage to livelihood if your income depended on it)

and I think that the judge might have to be in just the right technical know-spot as well and someone who can understand the situation from programmer's perspective hopefully.

Then I can see a case being made.

once again not a lawyer but an interesting question, would love reading other replies to your comment.

also for what its worth, you can sue any company for X,Y or Z. The question worth asking is if you can win such lawsuit.

Personally I believe it might be hard but not impossible but for all practical use cases it might as well be but the only answer can probably be found in court. I am just guessing at this point.