eventEntryExceptionGroup.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. import {EntryException, EntryType} from 'sentry/types/event';
  2. export function EventEntryExceptionGroupFixture(): EntryException {
  3. return {
  4. type: EntryType.EXCEPTION,
  5. data: {
  6. excOmitted: null,
  7. hasSystemFrames: false,
  8. values: [
  9. {
  10. type: 'ValueError',
  11. value: 'test',
  12. mechanism: {
  13. handled: true,
  14. type: '',
  15. exception_id: 4,
  16. is_exception_group: false,
  17. parent_id: 3,
  18. source: 'exceptions[2]',
  19. },
  20. stacktrace: {
  21. framesOmitted: null,
  22. hasSystemFrames: false,
  23. registers: null,
  24. frames: [
  25. {
  26. function: 'func4',
  27. module: 'helpers',
  28. filename: 'file4.py',
  29. absPath: 'file4.py',
  30. lineNo: 50,
  31. colNo: null,
  32. context: [[50, 'raise ValueError("test")']],
  33. inApp: true,
  34. rawFunction: null,
  35. package: null,
  36. platform: null,
  37. instructionAddr: null,
  38. symbol: null,
  39. symbolAddr: null,
  40. trust: null,
  41. vars: null,
  42. },
  43. ],
  44. },
  45. module: 'helpers',
  46. threadId: null,
  47. rawStacktrace: null,
  48. },
  49. {
  50. type: 'ExceptionGroup 2',
  51. value: 'child',
  52. mechanism: {
  53. handled: true,
  54. type: '',
  55. exception_id: 3,
  56. is_exception_group: true,
  57. parent_id: 1,
  58. source: 'exceptions[1]',
  59. },
  60. stacktrace: {
  61. framesOmitted: null,
  62. hasSystemFrames: false,
  63. registers: null,
  64. frames: [
  65. {
  66. function: 'func3',
  67. module: 'helpers',
  68. filename: 'file3.py',
  69. absPath: 'file3.py',
  70. lineNo: 50,
  71. colNo: null,
  72. context: [],
  73. inApp: true,
  74. rawFunction: null,
  75. package: null,
  76. platform: null,
  77. instructionAddr: null,
  78. symbol: null,
  79. symbolAddr: null,
  80. trust: null,
  81. vars: null,
  82. },
  83. ],
  84. },
  85. module: 'helpers',
  86. rawStacktrace: null,
  87. threadId: null,
  88. },
  89. {
  90. type: 'TypeError',
  91. value: 'nested',
  92. mechanism: {
  93. handled: true,
  94. type: '',
  95. exception_id: 2,
  96. is_exception_group: false,
  97. parent_id: 1,
  98. source: 'exceptions[0]',
  99. },
  100. stacktrace: {
  101. framesOmitted: null,
  102. hasSystemFrames: false,
  103. registers: null,
  104. frames: [
  105. {
  106. function: 'func2',
  107. module: 'helpers',
  108. filename: 'file2.py',
  109. absPath: 'file2.py',
  110. lineNo: 50,
  111. colNo: null,
  112. context: [[50, 'raise TypeError("int")']],
  113. inApp: true,
  114. rawFunction: null,
  115. package: null,
  116. platform: null,
  117. instructionAddr: null,
  118. symbol: null,
  119. symbolAddr: null,
  120. trust: null,
  121. vars: null,
  122. },
  123. ],
  124. },
  125. module: 'helpers',
  126. threadId: null,
  127. rawStacktrace: null,
  128. },
  129. {
  130. type: 'ExceptionGroup 1',
  131. value: 'parent',
  132. mechanism: {
  133. handled: true,
  134. type: '',
  135. exception_id: 1,
  136. is_exception_group: true,
  137. source: '__context__',
  138. },
  139. stacktrace: {
  140. framesOmitted: null,
  141. hasSystemFrames: false,
  142. registers: null,
  143. frames: [
  144. {
  145. function: 'func1',
  146. module: 'helpers',
  147. filename: 'file1.py',
  148. absPath: 'file1.py',
  149. lineNo: 50,
  150. colNo: null,
  151. context: [[50, 'raise ExceptionGroup("parent")']],
  152. inApp: true,
  153. rawFunction: null,
  154. package: null,
  155. platform: null,
  156. instructionAddr: null,
  157. symbol: null,
  158. symbolAddr: null,
  159. trust: null,
  160. vars: null,
  161. },
  162. ],
  163. },
  164. module: 'helpers',
  165. threadId: null,
  166. rawStacktrace: null,
  167. },
  168. ],
  169. },
  170. };
  171. }