File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -799,8 +799,8 @@ function safe_message(e::Exception)
799
799
if e isa RequestException
800
800
msg = message (e)
801
801
r = reason (e)
802
- if contains (msg, " <Error>" ) || contains (msg, " http " )
803
- # Contains unreadacted payload from backend or urls , try extracting safe information
802
+ if contains (msg, " <Error>" )
803
+ # Contains unreadacted payload from backend, try extracting safe information
804
804
code, backend_msg, report = extract_safe_parts (message (e))
805
805
reason_str = reason_description (r)
806
806
@@ -809,6 +809,9 @@ function safe_message(e::Exception)
809
809
retry_report = isnothing (report) ? " " : " \n\n $(report) "
810
810
811
811
return " $(backend_msg) (code: $(code) , reason: $(reason_str) )$(retry_report) "
812
+ elseif contains (msg, " http" )
813
+ # Contains urls, redact them
814
+ return replace (msg, r" https?://[^\n )]+" => " <redacted url>" )
812
815
else
813
816
# Assuming it safe as it does not come from backend or has url, return message directly
814
817
return msg
You can’t perform that action at this time.
0 commit comments