File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,8 @@ def single_exception_from_error_tuple(
672672 is_root_exception = exception_id == 0
673673 if not is_root_exception and parent_id is not None :
674674 exception_value ["mechanism" ]["parent_id" ] = parent_id
675- exception_value ["mechanism" ]["type" ] = "chained"
675+ if "type" not in exception_value ["mechanism" ]:
676+ exception_value ["mechanism" ]["type" ] = "chained"
676677
677678 if is_root_exception and "type" not in exception_value ["mechanism" ]:
678679 exception_value ["mechanism" ]["type" ] = "generic"
Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ def test_exception_chain_context():
258258 "mechanism" : {
259259 "handled" : False ,
260260 "type" : "test_suite" ,
261+ "exception_id" : 1 ,
261262 },
262263 "module" : None ,
263264 "type" : "TypeError" ,
@@ -267,6 +268,7 @@ def test_exception_chain_context():
267268 "mechanism" : {
268269 "handled" : False ,
269270 "type" : "test_suite" ,
271+ "exception_id" : 0 ,
270272 },
271273 "module" : None ,
272274 "type" : "ValueError" ,
@@ -297,6 +299,7 @@ def test_simple_exception():
297299 "mechanism" : {
298300 "handled" : False ,
299301 "type" : "test_suite" ,
302+ "exception_id" : 0 ,
300303 },
301304 "module" : None ,
302305 "type" : "ValueError" ,
You can’t perform that action at this time.
0 commit comments