SIGN IN SIGN UP

Fix GithubException.__str__ decoding bytes data (#3494)

`GithubException.__str__` calls `json.dumps(self.data)` directly, which
raises `TypeError: Object of type bytes is not JSON serializable` when
the exception is constructed from a non-JSON response body that
`requests` returns as `bytes` (e.g. an HTML rate-limit page on a 403).
Decode bytes to text before serialising so callers can log or stringify
these exceptions without crashing.

Fixes #3492.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
S
Sai Asish Y committed
7a3b22ed6dcaff63ba37200e524ba3dd3c05743a
Parent: 5fe1c77
Committed by GitHub <noreply@github.com> on 6/2/2026, 9:31:25 AM