Skip to content

Commit 301e411

Browse files
committed
Fixed a crash that could occur if authentication times out with the Google presentation API. This isnt the best fix since the operation will fail but it prevents the crash. If it times out during a command then the command will fail but it wont crash so you can do it again to recover. Its not clear why it times out sometimes but regardless BeefBot shouldnt crash if it does.
1 parent f7ef952 commit 301e411

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Beef/PresentationManager.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ public ErrorCode Authenticate() {
6868
PresentationsResource.GetRequest request = _service.Presentations.Get(_presentationId);
6969

7070
// Prints all the beef participants
71-
_presentation = request.Execute();
71+
try {
72+
_presentation = request.Execute();
73+
} catch (Exception ex) {
74+
Console.WriteLine("Error when authenticating with the presentation API.");
75+
Console.WriteLine(ex.Message);
76+
}
77+
7278
if (_presentation != null)
7379
return ErrorCode.Success;
7480

0 commit comments

Comments
 (0)