diff --git a/src/Core/Services/ConfigService.cs b/src/Core/Services/ConfigService.cs index 360fc4b0f..60515b358 100644 --- a/src/Core/Services/ConfigService.cs +++ b/src/Core/Services/ConfigService.cs @@ -37,7 +37,7 @@ namespace Bit.Core.Services _stateService.SetConfigs(_configs); } } - catch (ApiException ex) when (ex.Error.StatusCode == System.Net.HttpStatusCode.BadGateway) + catch (ApiException ex) when (ex.Error?.StatusCode == System.Net.HttpStatusCode.BadGateway) { // ignore if there is no internet connection and return local configs }