Skip to content

Commit adf9533

Browse files
represent python error correctly (#371)
1 parent 43b21e1 commit adf9533

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/tests/test_trinsic_services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def test_code():
2727
def test_responsestatus_exception(self):
2828
with self.assertRaises(ResponseStatusException) as rse:
2929
ResponseStatusException.assert_success(ResponseStatus.UNKNOWN_ERROR, "test should fail")
30-
self.assertEqual(f"test should fail failed, status={ResponseStatus.UNKNOWN_ERROR}", str(rse.exception))
30+
self.assertEqual(f"test should fail failed, status={repr(ResponseStatus.UNKNOWN_ERROR)}", str(rse.exception))
3131
ResponseStatusException.assert_success(ResponseStatus.SUCCESS, "This should NOT fail")
3232

3333
@unittest.skip("Ecosystem support not implemented")

python/trinsic/service_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ def channel(self):
9595

9696
class ResponseStatusException(Exception):
9797
"""
98-
Exception raised when an action has a non-success reponse status.
98+
Exception raised when an action has a non-success response status.
9999
"""
100100

101101
def __init__(self, action: str, status: ResponseStatus):
102-
super().__init__(f"{action} failed, status={status}")
102+
super().__init__(f"{action} failed, status={repr(status)}")
103103
self.status = status
104104

105105
@staticmethod

0 commit comments

Comments
 (0)