Skip to content

Commit b7ff817

Browse files
Merge branch '4944-monitor-insert-error-surface' into ai_server
2 parents a1feb94 + a53ecc2 commit b7ff817

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

web/includes/actions/monitor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@
308308
}
309309
ZM\AuditAction('create', 'monitor', $mid, 'Name: '.($newMonitor['Name'] ?? ''));
310310
} else {
311-
ZM\Error('Error saving new Monitor.');
311+
$dbError = $monitor->get_last_error();
312+
$error_message .= 'Error saving new Monitor: '.($dbError ? $dbError : 'unknown database error').'<br/>';
313+
ZM\Error('Error saving new Monitor: '.$dbError);
312314
return;
313315
}
314316
}

0 commit comments

Comments
 (0)