update
This commit is contained in:
@@ -335,7 +335,7 @@ def send_error_notification(device_id, error_type, additional_info=None):
|
||||
try:
|
||||
response = requests.post(alert_url, timeout=3)
|
||||
if response.status_code == 200:
|
||||
print(f"✅ Alert notification sent successfully")
|
||||
#print(f"✅ Alert notification sent successfully")
|
||||
return True
|
||||
else:
|
||||
print(f"⚠️ Alert notification failed: Status code {response.status_code}")
|
||||
@@ -1005,7 +1005,7 @@ try:
|
||||
# INVALID SERVER HOSTNAME
|
||||
elif error_code == 4:
|
||||
print('<p class="text-danger">Error 4: Invalid server Hostname</p>')
|
||||
send_error_notification(device_id, "UHTTPER (error n°4) -> Invalid Server Hostname")
|
||||
send_error_notification(device_id, "UHTTPER (error n°4) -> AirCarto Invalid Server Hostname")
|
||||
server_hostname_resets = reset_server_hostname(aircarto_profile_id)
|
||||
if server_hostname_resets:
|
||||
print("✅server hostname reset successfully")
|
||||
@@ -1308,7 +1308,7 @@ try:
|
||||
send_error_notification(device_id, "UHTTPER (4) uSpot Invalid server Hostname")
|
||||
server_hostname_resets = reset_server_hostname_https(uSpot_profile_id)
|
||||
if server_hostname_resets:
|
||||
print("✅server hostname reset successfully")
|
||||
print("✅ uSpot - server hostname reset successfully")
|
||||
else:
|
||||
print("⛔There were issues with the modem server hostname reinitialize process")
|
||||
# SERVER CONNECTION ERROR
|
||||
@@ -1321,9 +1321,13 @@ try:
|
||||
elif error_code == 44:
|
||||
print('<p class="text-danger">Error 44: Connection lost</p>')
|
||||
elif error_code == 73:
|
||||
print('<p class="text-danger">Error 73: Secure socket connect error</p>', end="")
|
||||
print('<p class="text-danger">Error 73: uSpot - Secure socket connect error</p>', end="")
|
||||
send_error_notification(device_id, "uSpot - Secure socket connect error")
|
||||
#Software Reboot ??
|
||||
server_hostname_resets = reset_server_hostname_https(uSpot_profile_id)
|
||||
if server_hostname_resets:
|
||||
print("✅ uSpot - server hostname reset successfully")
|
||||
else:
|
||||
print("⛔There were issues with the modem server hostname reinitialize process")
|
||||
|
||||
else:
|
||||
print(f'<p class="text-danger">Unknown error code: {error_code}</p>',end="")
|
||||
|
||||
Reference in New Issue
Block a user