debug(contacts): Add detailed logging for contact deletion

Added logging to see exactly what meshcli returns when removing a contact.
This will help diagnose why contacts are not being deleted despite
returning success status.
This commit is contained in:
MarekWo
2025-12-30 09:37:18 +01:00
parent 72605aed21
commit 43edef22db
2 changed files with 4 additions and 0 deletions

View File

@@ -628,11 +628,15 @@ def delete_contact(selector: str) -> Tuple[bool, str]:
try:
success, stdout, stderr = _run_command(['remove_contact', selector.strip()])
# Log the meshcli response for debugging
logger.info(f"remove_contact {selector}: success={success}, stdout='{stdout}', stderr='{stderr}'")
if success:
message = stdout.strip() if stdout.strip() else f"Contact {selector} removed successfully"
return True, message
else:
error = stderr.strip() if stderr.strip() else "Failed to remove contact"
logger.warning(f"remove_contact failed for {selector}: {error}")
return False, error
except Exception as e:

BIN
clients.json Normal file

Binary file not shown.