Skip to content

Commit 9ec18ea

Browse files
Check metaclass error_code property properly
Signed-off-by: Andres Gomez Ferrer <andresg@spotify.com>
1 parent 3aebd23 commit 9ec18ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flytekit/exceptions/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def value(self):
3131

3232
@property
3333
def error_code(self):
34-
return self.value.error_code if hasattr(self.value, "error_code") else self._ERROR_CODE
34+
return self.value.__class__.error_code if hasattr(self.value.__class__, "error_code") else self._ERROR_CODE
3535

3636

3737
class FlyteTypeException(FlyteUserException, TypeError):

0 commit comments

Comments
 (0)