Skip to content

Commit 11a5fc2

Browse files
authored
fix(error): convert fabric error context to str,str (#7)
1 parent ad6b1f4 commit 11a5fc2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/core/ydata/core/error/fabric_error.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import annotations
12
import json
23
from typing import Optional
34

@@ -8,13 +9,17 @@ def _camelcased(value: str) -> str:
89

910

1011
class FabricError(Exception):
11-
context: Optional[dict]
12+
context: Optional[dict[str, str]]
1213
description: str
1314
http_code: Optional[int]
1415
name: Optional[str]
1516
return_value: int
1617

17-
def __init__(self, context: Optional[dict] = None, http_code: Optional[int] = None, name: Optional[str] = None):
18+
def __init__(
19+
self,
20+
context: Optional[dict[str, str]] = None,
21+
http_code: Optional[int] = None,
22+
name: Optional[str] = None):
1823
self.context = context
1924
self.http_code = http_code
2025
self.name = name

0 commit comments

Comments
 (0)