mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
[PM-11749] Add device type to device trust loss logging (#4742)
* Add device type to trust loss logging. * Added check for null.
This commit is contained in:
parent
dd6bc89b19
commit
ebf8bc0b85
@ -252,8 +252,14 @@ public class DevicesController : Controller
|
||||
throw new BadRequestException("Please provide a device identifier");
|
||||
}
|
||||
|
||||
_logger.LogError("User {id} has a device key, but didn't receive decryption keys for device {device}", userId,
|
||||
deviceId);
|
||||
var deviceType = _currentContext.DeviceType;
|
||||
if (deviceType == null)
|
||||
{
|
||||
throw new BadRequestException("Please provide a device type");
|
||||
}
|
||||
|
||||
_logger.LogError("User {id} has a device key, but didn't receive decryption keys for device {device} of type {deviceType}", userId,
|
||||
deviceId, deviceType);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user