Be specific on catching github exceptions.

Finishes [#80215916]

There will be a corresponding UI PR to catch the exception on the UI side and show a message.