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)
799799 if e isa RequestException
800800 msg = message(e)
801801 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
804804 code, backend_msg, report = extract_safe_parts(message(e))
805805 reason_str = reason_description(r)
806806
@@ -809,6 +809,9 @@ function safe_message(e::Exception)
809809 retry_report = isnothing(report) ? " " : " \n\n $(report) "
810810
811811 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>" )
812815 else
813816 # Assuming it safe as it does not come from backend or has url, return message directly
814817 return msg
You can’t perform that action at this time.
0 commit comments