File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/Certify.Core/Management/CertifyManager Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -295,11 +295,18 @@ private async Task EnsureMgmtHubConnection()
295295 // if not set by env, check if we already have a management hub joining key as a stored credential
296296 if ( _mgmtHubJoiningSecret == null )
297297 {
298- var secret = await _credentialsManager . GetUnlockedCredential ( CertifyManager . MgmtHubJoiningCredId ) ;
298+ try
299+ {
300+ var secret = await _credentialsManager . GetUnlockedCredential ( CertifyManager . MgmtHubJoiningCredId ) ;
299301
300- if ( secret != null )
302+ if ( secret != null )
303+ {
304+ _mgmtHubJoiningSecret = JsonSerializer . Deserialize < ClientSecret > ( secret , JsonOptions . DefaultJsonSerializerOptions ) ;
305+ }
306+ }
307+ catch ( Exception ex )
301308 {
302- _mgmtHubJoiningSecret = JsonSerializer . Deserialize < ClientSecret > ( secret , JsonOptions . DefaultJsonSerializerOptions ) ;
309+ _serviceLog . Error ( ex , "Error retrieving management hub joining key from credentials store." ) ;
303310 }
304311 }
305312
You can’t perform that action at this time.
0 commit comments