moved github api exception handling