From 11a5fc25615f4340e7a039859b6be1a0ec187286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Portela=20Afonso?= Date: Tue, 18 Oct 2022 16:15:36 +0100 Subject: [PATCH] fix(error): convert fabric error context to str,str (#7) --- src/core/ydata/core/error/fabric_error.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/ydata/core/error/fabric_error.py b/src/core/ydata/core/error/fabric_error.py index c784c20..59928e8 100644 --- a/src/core/ydata/core/error/fabric_error.py +++ b/src/core/ydata/core/error/fabric_error.py @@ -1,3 +1,4 @@ +from __future__ import annotations import json from typing import Optional @@ -8,13 +9,17 @@ def _camelcased(value: str) -> str: class FabricError(Exception): - context: Optional[dict] + context: Optional[dict[str, str]] description: str http_code: Optional[int] name: Optional[str] return_value: int - def __init__(self, context: Optional[dict] = None, http_code: Optional[int] = None, name: Optional[str] = None): + def __init__( + self, + context: Optional[dict[str, str]] = None, + http_code: Optional[int] = None, + name: Optional[str] = None): self.context = context self.http_code = http_code self.name = name