[PM-2915] Fix config service null exception error bug (#2778)

This commit is contained in:
André Bispo 2023-10-02 20:43:42 +01:00 committed by GitHub
parent bbef0f8c93
commit 685e0f407a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}