Skip to content

Commit 81b4e2c

Browse files
committed
Addressing code review findings
1 parent 6694b8c commit 81b4e2c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

orbit/pkg/update/notifications.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,13 @@ func (w *windowsMDMBitlockerConfigFetcher) attemptBitlockerEncryption(notifs fle
487487
// Otherwise, using the real one
488488
fn = bitlocker.EncryptVolume
489489
}
490+
491+
// Encryption operation is performed here, err will be captured if any
492+
// Error will be returned if the encryption operation failed after sending it to Fleet Server
490493
recoveryKey, err := fn(targetVolume)
491494

492495
// Getting Bitlocker encryption operation error message if any
496+
// This is going to be sent to Fleet Server
493497
bitlockerError := ""
494498
if err != nil {
495499
bitlockerError = err.Error()
@@ -507,6 +511,8 @@ func (w *windowsMDMBitlockerConfigFetcher) attemptBitlockerEncryption(notifs fle
507511
return
508512
}
509513

514+
// This is the error status of the Bitlocker encryption operation
515+
// it is returned here after sending the result to Fleet Server
510516
if err != nil {
511517
log.Error().Err(err).Msg("failed to encrypt the volume")
512518
return

0 commit comments

Comments
 (0)