write_error doesn't allow for encoding of anything other than APIError subclasses

Bug #791136 reported by Kevin McDermott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txAWS
New
Undecided
Unassigned

Bug Description

        def write_error(failure):
            log.err(failure)
            if failure.check(APIError):
                status = failure.value.status
                bytes = failure.value.response
                if bytes is None:
                    bytes = self.dump_error(failure.value, request)
            else:
                bytes = str(failure.value)
                status = 500

So, there's no scope for encoding anything other than APIError subclasses, this means that, for example, psycopg2.errors pass through unencoded, and are returned directly to callers in plain text.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.