Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
aisk committed Jul 2, 2024
2 parents a86a1a7 + ca86d46 commit 8688519
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aiodynamo/errors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from dataclasses import dataclass
from typing import Any, Dict, List, Union
from typing import Any, Dict, List, Optional


@dataclass(frozen=True)
Expand Down Expand Up @@ -117,11 +117,11 @@ class PointInTimeRecoveryUnavailable(AIODynamoError):


class TransactionCanceled(AIODynamoError):
cancellation_reasons: List[Union[CancellationReason, None]]
cancellation_reasons: List[Optional[CancellationReason]]

def __init__(self, body: Dict[str, Any]):
self.body = body
self.cancellation_reasons: List[CancellationReason] = [
self.cancellation_reasons: List[Optional[CancellationReason]] = [
CancellationReason(reason["Code"], reason["Message"])
if reason["Code"] != "None"
else None
Expand Down

0 comments on commit 8688519

Please sign in to comment.