Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Decode response with errors parameter #642

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions seleniumwire/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def urlsafe_address(address):
return addr, port


def decode(data: bytes, encoding: str) -> bytes:
def decode(data: bytes, encoding: str, errors='strict') -> bytes:
"""Attempt to decode data based on the supplied encoding.

If decoding fails a ValueError is raised.
Expand All @@ -195,4 +195,4 @@ def decode(data: bytes, encoding: str) -> bytes:
Returns: The decoded data.
Raises: ValueError if the data could not be decoded.
"""
return decoder.decode(data, encoding)
return decoder.decode(data, encoding, errors)