INNER CODE UNIT · Python
_utc_now_iso
FLOCK4H/Dexter · Dexter.py:136
def _utc_now_iso() -> str:
return datetime.datetime.now(datetime.timezone.utc).isoformat()
def _parse_instruction_error_code(result: str | None) -> int | None:
if not result or not isinstance(result, str):
return None
if not result.startswith("InstructionError"):
return None
_prefix, _separator, raw_code = result.partition(":")
if not raw_code:
return None
try:
return int(raw_code)
except (TypeError, ValueError):
return None