fleet
fleet copied to clipboard
Clarify error message for sending lock command via API to Host without MDM enabled
Fleet version: 4.68.1
Web browser and operating system: latest Chrome
💥 Actual behavior
customer-starchik reported the following error:
unexpected status code 422 from 'POST hosts/20929/lock?view_pin=true' : {
"message": "Validation Failed",
"errors": [
{
"name": "base",
"reason": "Error 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`fleet`.`nano_enrollment_queue`, CONSTRAINT `nano_enrollment_queue_ibfk_1` FOREIGN KEY (`id`) REFERENCES `nano_enrollments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
}
]
}
This error refers to there being no row in the referenced table for a Host's enrollment. That the row does not exist is expected BECAUSE MDM is not enabled. This error could be more specific to say that MDM is not enabled for this Host.
Error message for this may already be designed & approved per @noahtalerman - please see: https://www.figma.com/design/FCmmIh1y1DTzlRF5JsH3wh/-9949----9951-Remote-lock-and-remote-wipe-for-macOS--Windows--and-Linux?node-id=469-5043
🧑💻 Steps to reproduce
- Send a Lock command via the API to a Host on which MDM is not enabled.