mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 16:39:21 +01:00
Fix NullReferenceException
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Tgstation.Server.Client
|
||||
public ServerClient(IApiClient apiClient, Token token)
|
||||
{
|
||||
this.apiClient = apiClient ?? throw new ArgumentNullException(nameof(apiClient));
|
||||
token = token ?? throw new ArgumentNullException(nameof(token));
|
||||
this.token = token ?? throw new ArgumentNullException(nameof(token));
|
||||
|
||||
if (Token.Bearer != apiClient.Headers.Token)
|
||||
throw new ArgumentOutOfRangeException(nameof(token), token, "Provided token does not match apiClient headers!");
|
||||
|
||||
Reference in New Issue
Block a user