Spaces:
Running
Running
Update src/content/common.py
Browse files- src/content/common.py +2 -1
src/content/common.py
CHANGED
@@ -601,7 +601,8 @@ def retrive_response_with_ui(
|
|
601 |
st.write(response)
|
602 |
|
603 |
except requests.exceptions.RequestException as e:
|
604 |
-
error_msg =
|
|
|
605 |
st.error(error_msg)
|
606 |
|
607 |
if show_warning:
|
|
|
601 |
st.write(response)
|
602 |
|
603 |
except requests.exceptions.RequestException as e:
|
604 |
+
error_msg = re.sub("[a-zA-Z0-9_\-.]+\.com", "<hostname>", str(e))
|
605 |
+
error_msg = f"API request failed: {error_msg}"
|
606 |
st.error(error_msg)
|
607 |
|
608 |
if show_warning:
|