diff --git a/Conductor/Client/Authentication/TokenHandler.cs b/Conductor/Client/Authentication/TokenHandler.cs index f0579e1..e743e29 100644 --- a/Conductor/Client/Authentication/TokenHandler.cs +++ b/Conductor/Client/Authentication/TokenHandler.cs @@ -62,7 +62,15 @@ private string GetTokenFromServer(OrkesAuthenticationSettings authenticationSett { try { - return tokenClient.GenerateToken(tokenRequest)._token; + var token = tokenClient.GenerateToken(tokenRequest); + return token._token; + } + catch (ApiException e) + { + if (e.ErrorCode == 405 || e.ErrorCode == 404) + { + throw new Exception($"Error while getting authentication token. Is the config BasePath correct? {tokenClient.Configuration.BasePath}"); + } } catch (Exception e) {