in amazon_transcribe/eventstream.py [0:0]
def to_response_dict(self, status_code=200) -> Dict[str, Any]:
message_type = self.headers.get(":message-type")
if message_type == "error" or message_type == "exception":
status_code = 400
return {
"status_code": status_code,
"headers": self.headers,
"body": self.payload,
}