MCPcopy
hub / github.com/redis/redis-py / _raise_first_error

Method _raise_first_error

redis/asyncio/cluster.py:3007–3024  ·  view source on GitHub ↗

Raise the first exception on the stack

(self, responses, stack, start_time)

Source from the content-addressed store, hash-verified

3005 self._executing = False
3006
3007 async def _raise_first_error(self, responses, stack, start_time):
3008 """
3009 Raise the first exception on the stack
3010 """
3011 for r, cmd in zip(responses, stack):
3012 if isinstance(r, Exception):
3013 self._annotate_exception(r, cmd.position + 1, cmd.args)
3014
3015 await record_operation_duration(
3016 command_name="TRANSACTION",
3017 duration_seconds=time.monotonic() - start_time,
3018 server_address=self._transaction_connection.host,
3019 server_port=self._transaction_connection.port,
3020 db_namespace=str(self._transaction_connection.db),
3021 error=r,
3022 )
3023
3024 raise r
3025
3026 def mset_nonatomic(
3027 self, mapping: Mapping[AnyKeyT, EncodableT]

Callers 1

_execute_transactionMethod · 0.95

Calls 3

_annotate_exceptionMethod · 0.80
monotonicMethod · 0.80

Tested by

no test coverage detected