Skip to content

Commit 971beaa

Browse files
committed
log exceptions as str
1 parent 6da1657 commit 971beaa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reddit_decider/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,10 @@ def get_variant(
347347
try:
348348
decision = self._internal.choose(experiment_name, ctx)
349349
except FeatureNotFoundException as exc:
350-
warnings.warn(exc)
350+
warnings.warn(str(exc))
351351
return None
352352
except DeciderException as exc:
353-
logger.info(exc)
353+
logger.info(str(exc))
354354
return None
355355

356356
event_context_fields = self._decider_context.to_event_dict()
@@ -385,10 +385,10 @@ def get_variant_without_expose(self, experiment_name: str) -> Optional[str]:
385385
try:
386386
decision = self._internal.choose(experiment_name, ctx)
387387
except FeatureNotFoundException as exc:
388-
warnings.warn(exc)
388+
warnings.warn(str(exc))
389389
return None
390390
except DeciderException as exc:
391-
logger.info(exc)
391+
logger.info(str(exc))
392392
return None
393393

394394
event_context_fields = self._decider_context.to_event_dict()

0 commit comments

Comments
 (0)