Skip to content

Commit 844aed8

Browse files
committed
Fixed an argumentoutofrange exception that could occur when an invalid api key was used.
1 parent 589aa5e commit 844aed8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Shared/Extensions/ExceptionlessConfigurationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static void SetUserIdentity(this ExceptionlessConfiguration config, UserI
6969
}
7070

7171
public static string GetQueueName(this ExceptionlessConfiguration config) {
72-
return !String.IsNullOrEmpty(config.ApiKey) ? config.ApiKey.Substring(0, 8) : null;
72+
return !String.IsNullOrEmpty(config.ApiKey) && config.ApiKey.Length > 7 ? config.ApiKey.Substring(0, 8) : null;
7373
}
7474

7575
public static string GetInstallId(this ExceptionlessConfiguration config) {

0 commit comments

Comments
 (0)