Skip to content

Commit

Permalink
Replace unicode errors in error message, close #366
Browse files Browse the repository at this point in the history
  • Loading branch information
lexiforest committed Sep 24, 2024
1 parent ac35c18 commit 3b9b46d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion curl_cffi/curl.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _check_error(self, errcode: int, *args: Any) -> None:

def _get_error(self, errcode: int, *args: Any):
if errcode != 0:
errmsg = ffi.string(self._error_buffer).decode()
errmsg = ffi.string(self._error_buffer).decode(errors="backslashreplace")
action = " ".join([str(a) for a in args])
return CurlError(
f"Failed to {action}, curl: ({errcode}) {errmsg}. "
Expand Down

0 comments on commit 3b9b46d

Please sign in to comment.