UI - Better 40x error message (#2685)

skip_when_checksum_same-disable
dgtlmoon 3 months ago committed by GitHub
parent fe8e3d1cb1
commit ec4e2f5649
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -338,7 +338,8 @@ class update_worker(threading.Thread):
elif e.status_code == 500: elif e.status_code == 500:
err_text = "Error - 500 (Internal server error) received from the web site" err_text = "Error - 500 (Internal server error) received from the web site"
else: else:
err_text = "Error - Request returned a HTTP error code {}".format(str(e.status_code)) extra = ' (Access denied or blocked)' if str(e.status_code).startswith('4') else ''
err_text = f"Error - Request returned a HTTP error code {e.status_code}{extra}"
if e.screenshot: if e.screenshot:
watch.save_screenshot(screenshot=e.screenshot, as_error=True) watch.save_screenshot(screenshot=e.screenshot, as_error=True)

Loading…
Cancel
Save