Added setting exception code when throwing new github exception