Browse Source

Add sample js error with sourcemap for testing

David Burke 2 years ago
parent
commit
5226c7c4ab

+ 65 - 0
events/test_data/incoming_events/small_js_error_source.json

@@ -0,0 +1,65 @@
+{
+  "exception": {
+    "values": [
+      {
+        "type": "Error",
+        "value": "this is an error",
+        "stacktrace": {
+          "frames": [
+            {
+              "filename": "http://localhost:8080/dist/bundle.js",
+              "function": "?",
+              "in_app": true,
+              "lineno": 2,
+              "colno": 74022
+            },
+            {
+              "filename": "http://localhost:8080/dist/bundle.js",
+              "function": "?",
+              "in_app": true,
+              "lineno": 2,
+              "colno": 74018
+            },
+            {
+              "filename": "http://localhost:8080/dist/bundle.js",
+              "function": "?",
+              "in_app": true,
+              "lineno": 2,
+              "colno": 73991
+            }
+          ]
+        },
+        "mechanism": { "type": "onerror", "handled": false }
+      }
+    ]
+  },
+  "level": "error",
+  "platform": "javascript",
+  "event_id": "f4e67b1b9293445a9545465b0b58696c",
+  "timestamp": 1648928683.501,
+  "environment": "production",
+  "release": "1.0",
+  "sdk": {
+    "integrations": [
+      "InboundFilters",
+      "FunctionToString",
+      "TryCatch",
+      "Breadcrumbs",
+      "GlobalHandlers",
+      "LinkedErrors",
+      "Dedupe",
+      "UserAgent"
+    ],
+    "name": "sentry.javascript.browser",
+    "version": "6.19.2",
+    "packages": [{ "name": "npm:@sentry/browser", "version": "6.19.2" }]
+  },
+  "request": {
+    "url": "http://localhost:8080/",
+    "headers": {
+      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
+    }
+  },
+  "tags": { "skippedNormalization": true },
+  "extra": { "normalizeDepth": 3 }
+}

+ 403 - 0
events/test_data/oss_sentry_events/small_js_error_source.json

@@ -0,0 +1,403 @@
+{
+  "eventID": "f4e67b1b9293445a9545465b0b58696c",
+  "dist": null,
+  "userReport": null,
+  "projectID": "11",
+  "previousEventID": null,
+  "message": "Error this is an error webpack://small-js-error-factory/./src/index.ts ?(src/index)",
+  "id": "5255",
+  "size": 4575,
+  "errors": [],
+  "culprit": "?(src/index)",
+  "title": "Error: this is an error",
+  "platform": "javascript",
+  "location": "webpack://small-js-error-factory/./src/index.ts",
+  "nextEventID": null,
+  "type": "error",
+  "metadata": {
+    "type": "Error",
+    "value": "this is an error",
+    "filename": "webpack://small-js-error-factory/./src/index.ts"
+  },
+  "groupingConfig": {
+    "id": "legacy:2019-03-12"
+  },
+  "crashFile": null,
+  "tags": [
+    {
+      "value": "Firefox 98.0",
+      "key": "browser",
+      "_meta": null
+    },
+    {
+      "value": "Firefox",
+      "key": "browser.name",
+      "_meta": null
+    },
+    {
+      "value": "production",
+      "key": "environment",
+      "_meta": null
+    },
+    {
+      "value": "no",
+      "key": "handled",
+      "_meta": null
+    },
+    {
+      "value": "error",
+      "key": "level",
+      "_meta": null
+    },
+    {
+      "value": "onerror",
+      "key": "mechanism",
+      "_meta": null
+    },
+    {
+      "value": "Ubuntu",
+      "key": "os.name",
+      "_meta": null
+    },
+    {
+      "value": "1.0",
+      "key": "release",
+      "_meta": null
+    },
+    {
+      "value": "True",
+      "key": "skippedNormalization",
+      "_meta": null
+    },
+    {
+      "value": "http://localhost:8080/",
+      "key": "url",
+      "_meta": null
+    },
+    {
+      "query": "user.ip:71.249.111.206",
+      "value": "ip:71.249.111.206",
+      "key": "user",
+      "_meta": null
+    }
+  ],
+  "dateCreated": "2022-04-02T19:44:43.501Z",
+  "dateReceived": "2022-04-02T19:49:58.910Z",
+  "user": {
+    "username": null,
+    "name": null,
+    "ip_address": "71.249.111.206",
+    "email": null,
+    "data": {},
+    "id": null
+  },
+  "entries": [
+    {
+      "type": "exception",
+      "data": {
+        "values": [
+          {
+            "stacktrace": {
+              "frames": [
+                {
+                  "function": null,
+                  "map": "bundle.js.map",
+                  "colNo": 13,
+                  "vars": null,
+                  "symbol": null,
+                  "mapUrl": "http://localhost:8080/dist/bundle.js.map",
+                  "module": "src/index",
+                  "origAbsPath": "?",
+                  "lineNo": 6,
+                  "origColNo": "?",
+                  "trust": null,
+                  "origFunction": "?",
+                  "errors": null,
+                  "package": null,
+                  "absPath": "webpack://small-js-error-factory/./src/index.ts",
+                  "inApp": false,
+                  "instructionAddr": null,
+                  "filename": "webpack://small-js-error-factory/./src/index.ts",
+                  "origFilename": "?",
+                  "platform": null,
+                  "context": [
+                    [1, "import * as Sentry from \"@sentry/browser\";"],
+                    [2, ""],
+                    [
+                      3,
+                      "Sentry.init({\"dsn\": \"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\", \"release\": \"1.0\"});"
+                    ],
+                    [4, ""],
+                    [5, "let foo = \"bar\";"],
+                    [6, "throw Error(\"this is an error\");"],
+                    [7, "console.log(foo);"],
+                    [8, ""]
+                  ],
+                  "symbolAddr": null,
+                  "origLineNo": "?"
+                },
+                {
+                  "function": null,
+                  "map": "bundle.js.map",
+                  "colNo": 13,
+                  "vars": null,
+                  "symbol": null,
+                  "mapUrl": "http://localhost:8080/dist/bundle.js.map",
+                  "module": "src/index",
+                  "origAbsPath": "?",
+                  "lineNo": 6,
+                  "origColNo": "?",
+                  "trust": null,
+                  "origFunction": "?",
+                  "errors": null,
+                  "package": null,
+                  "absPath": "webpack://small-js-error-factory/./src/index.ts",
+                  "inApp": false,
+                  "instructionAddr": null,
+                  "filename": "webpack://small-js-error-factory/./src/index.ts",
+                  "origFilename": "?",
+                  "platform": null,
+                  "context": [
+                    [1, "import * as Sentry from \"@sentry/browser\";"],
+                    [2, ""],
+                    [
+                      3,
+                      "Sentry.init({\"dsn\": \"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\", \"release\": \"1.0\"});"
+                    ],
+                    [4, ""],
+                    [5, "let foo = \"bar\";"],
+                    [6, "throw Error(\"this is an error\");"],
+                    [7, "console.log(foo);"],
+                    [8, ""]
+                  ],
+                  "symbolAddr": null,
+                  "origLineNo": "?"
+                },
+                {
+                  "function": null,
+                  "map": "bundle.js.map",
+                  "colNo": 7,
+                  "vars": null,
+                  "symbol": null,
+                  "mapUrl": "http://localhost:8080/dist/bundle.js.map",
+                  "module": "src/index",
+                  "origAbsPath": "?",
+                  "lineNo": 6,
+                  "origColNo": "?",
+                  "trust": null,
+                  "origFunction": "?",
+                  "errors": null,
+                  "package": null,
+                  "absPath": "webpack://small-js-error-factory/./src/index.ts",
+                  "inApp": false,
+                  "instructionAddr": null,
+                  "filename": "webpack://small-js-error-factory/./src/index.ts",
+                  "origFilename": "?",
+                  "platform": null,
+                  "context": [
+                    [1, "import * as Sentry from \"@sentry/browser\";"],
+                    [2, ""],
+                    [
+                      3,
+                      "Sentry.init({\"dsn\": \"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\", \"release\": \"1.0\"});"
+                    ],
+                    [4, ""],
+                    [5, "let foo = \"bar\";"],
+                    [6, "throw Error(\"this is an error\");"],
+                    [7, "console.log(foo);"],
+                    [8, ""]
+                  ],
+                  "symbolAddr": null,
+                  "origLineNo": "?"
+                }
+              ],
+              "framesOmitted": null,
+              "registers": null,
+              "hasSystemFrames": false
+            },
+            "module": null,
+            "rawStacktrace": {
+              "frames": [
+                {
+                  "function": null,
+                  "colNo": 74022,
+                  "vars": null,
+                  "symbol": null,
+                  "module": null,
+                  "lineNo": 2,
+                  "trust": null,
+                  "errors": null,
+                  "package": null,
+                  "absPath": "http://localhost:8080/dist/bundle.js",
+                  "inApp": false,
+                  "instructionAddr": null,
+                  "filename": "/dist/bundle.js",
+                  "platform": null,
+                  "context": [
+                    [
+                      1,
+                      "/*! For license information please see bundle.js.LICENSE.txt */"
+                    ],
+                    [
+                      2,
+                      "{snip} ,(()=>{throw n(185).init({dsn:\"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\",release:\"1.0\"}),Error(\"this is an error\")})()})();"
+                    ],
+                    [3, "//# sourceMappingURL=bundle.js.map"]
+                  ],
+                  "symbolAddr": null
+                },
+                {
+                  "function": null,
+                  "colNo": 74018,
+                  "vars": null,
+                  "symbol": null,
+                  "module": null,
+                  "lineNo": 2,
+                  "trust": null,
+                  "errors": null,
+                  "package": null,
+                  "absPath": "http://localhost:8080/dist/bundle.js",
+                  "inApp": false,
+                  "instructionAddr": null,
+                  "filename": "/dist/bundle.js",
+                  "platform": null,
+                  "context": [
+                    [
+                      1,
+                      "/*! For license information please see bundle.js.LICENSE.txt */"
+                    ],
+                    [
+                      2,
+                      "{snip} ,(()=>{throw n(185).init({dsn:\"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\",release:\"1.0\"}),Error(\"this is an error\")})()})();"
+                    ],
+                    [3, "//# sourceMappingURL=bundle.js.map"]
+                  ],
+                  "symbolAddr": null
+                },
+                {
+                  "function": null,
+                  "colNo": 73991,
+                  "vars": null,
+                  "symbol": null,
+                  "module": null,
+                  "lineNo": 2,
+                  "trust": null,
+                  "errors": null,
+                  "package": null,
+                  "absPath": "http://localhost:8080/dist/bundle.js",
+                  "inApp": false,
+                  "instructionAddr": null,
+                  "filename": "/dist/bundle.js",
+                  "platform": null,
+                  "context": [
+                    [
+                      1,
+                      "/*! For license information please see bundle.js.LICENSE.txt */"
+                    ],
+                    [
+                      2,
+                      "{snip} ,(()=>{throw n(185).init({dsn:\"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\",release:\"1.0\"}),Error(\"this is an error\")})()})();"
+                    ],
+                    [3, "//# sourceMappingURL=bundle.js.map"]
+                  ],
+                  "symbolAddr": null
+                }
+              ],
+              "framesOmitted": null,
+              "registers": null,
+              "hasSystemFrames": false
+            },
+            "mechanism": {
+              "type": "onerror",
+              "handled": false
+            },
+            "threadId": null,
+            "value": "this is an error",
+            "type": "Error"
+          }
+        ],
+        "excOmitted": null,
+        "hasSystemFrames": false
+      }
+    },
+    {
+      "type": "request",
+      "data": {
+        "fragment": "",
+        "cookies": [],
+        "inferredContentType": null,
+        "env": null,
+        "headers": [
+          [
+            "User-Agent",
+            "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
+          ]
+        ],
+        "url": "http://localhost:8080/",
+        "query": [],
+        "data": null,
+        "method": null
+      }
+    }
+  ],
+  "packages": {},
+  "sdk": {
+    "version": "6.19.2",
+    "name": "sentry.javascript.browser",
+    "upstream": {
+      "url": null,
+      "isNewer": false,
+      "name": "sentry.javascript.browser"
+    }
+  },
+  "_meta": {
+    "user": null,
+    "context": null,
+    "entries": {},
+    "contexts": null,
+    "message": null,
+    "packages": null,
+    "tags": {},
+    "sdk": null
+  },
+  "contexts": {
+    "os": {
+      "type": "os",
+      "name": "Ubuntu"
+    },
+    "browser": {
+      "version": "98.0",
+      "type": "browser",
+      "name": "Firefox"
+    }
+  },
+  "fingerprints": ["d75931e06f591a159796e023fd11afae"],
+  "context": {
+    "normalizeDepth": 3
+  },
+  "release": {
+    "dateReleased": null,
+    "commitCount": 0,
+    "url": null,
+    "data": {},
+    "lastDeploy": null,
+    "deployCount": 0,
+    "dateCreated": "2022-04-02T19:47:38.318Z",
+    "lastEvent": "2022-04-02T19:44:43.501Z",
+    "version": "1.0",
+    "firstEvent": "2022-04-02T19:48:09.247Z",
+    "lastCommit": null,
+    "shortVersion": "1.0",
+    "authors": [],
+    "owner": null,
+    "newGroups": 1,
+    "ref": null,
+    "projects": [
+      {
+        "slug": "my-js-project",
+        "name": "My JS Project"
+      }
+    ]
+  },
+  "groupID": "314"
+}

+ 186 - 0
events/test_data/oss_sentry_json/small_js_error_source.json

@@ -0,0 +1,186 @@
+{
+  "event_id": "f4e67b1b9293445a9545465b0b58696c",
+  "project": 11,
+  "release": "1.0",
+  "dist": null,
+  "platform": "javascript",
+  "message": "",
+  "datetime": "2022-04-02T19:44:43.501000Z",
+  "time_spent": null,
+  "tags": [
+    ["browser", "Firefox 98.0"],
+    ["browser.name", "Firefox"],
+    ["environment", "production"],
+    ["handled", "no"],
+    ["level", "error"],
+    ["mechanism", "onerror"],
+    ["os.name", "Ubuntu"],
+    ["release", "1.0"],
+    ["user", "ip:71.249.111.206"],
+    ["skippedNormalization", "True"],
+    ["url", "http://localhost:8080/"]
+  ],
+  "contexts": {
+    "os": { "version": null, "name": "Ubuntu" },
+    "browser": { "version": "98.0", "name": "Firefox" }
+  },
+  "culprit": "?(src/index)",
+  "environment": "production",
+  "exception": {
+    "values": [
+      {
+        "stacktrace": {
+          "frames": [
+            {
+              "abs_path": "webpack://small-js-error-factory/./src/index.ts",
+              "pre_context": [
+                "import * as Sentry from \"@sentry/browser\";",
+                "",
+                "Sentry.init({\"dsn\": \"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\", \"release\": \"1.0\"});",
+                "",
+                "let foo = \"bar\";"
+              ],
+              "post_context": ["console.log(foo);", ""],
+              "module": "src/index",
+              "in_app": false,
+              "lineno": 6,
+              "colno": 13,
+              "filename": "webpack://small-js-error-factory/./src/index.ts",
+              "data": {
+                "sourcemap": "http://localhost:8080/dist/bundle.js.map"
+              },
+              "context_line": "throw Error(\"this is an error\");"
+            },
+            {
+              "abs_path": "webpack://small-js-error-factory/./src/index.ts",
+              "pre_context": [
+                "import * as Sentry from \"@sentry/browser\";",
+                "",
+                "Sentry.init({\"dsn\": \"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\", \"release\": \"1.0\"});",
+                "",
+                "let foo = \"bar\";"
+              ],
+              "post_context": ["console.log(foo);", ""],
+              "module": "src/index",
+              "in_app": false,
+              "lineno": 6,
+              "colno": 13,
+              "filename": "webpack://small-js-error-factory/./src/index.ts",
+              "data": {
+                "sourcemap": "http://localhost:8080/dist/bundle.js.map"
+              },
+              "context_line": "throw Error(\"this is an error\");"
+            },
+            {
+              "abs_path": "webpack://small-js-error-factory/./src/index.ts",
+              "pre_context": [
+                "import * as Sentry from \"@sentry/browser\";",
+                "",
+                "Sentry.init({\"dsn\": \"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\", \"release\": \"1.0\"});",
+                "",
+                "let foo = \"bar\";"
+              ],
+              "post_context": ["console.log(foo);", ""],
+              "module": "src/index",
+              "in_app": false,
+              "lineno": 6,
+              "colno": 7,
+              "filename": "webpack://small-js-error-factory/./src/index.ts",
+              "data": {
+                "sourcemap": "http://localhost:8080/dist/bundle.js.map"
+              },
+              "context_line": "throw Error(\"this is an error\");"
+            }
+          ]
+        },
+        "raw_stacktrace": {
+          "frames": [
+            {
+              "abs_path": "http://localhost:8080/dist/bundle.js",
+              "pre_context": [
+                "/*! For license information please see bundle.js.LICENSE.txt */"
+              ],
+              "post_context": ["//# sourceMappingURL=bundle.js.map"],
+              "in_app": false,
+              "lineno": 2,
+              "colno": 74022,
+              "filename": "/dist/bundle.js",
+              "context_line": "{snip} ,(()=>{throw n(185).init({dsn:\"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\",release:\"1.0\"}),Error(\"this is an error\")})()})();"
+            },
+            {
+              "abs_path": "http://localhost:8080/dist/bundle.js",
+              "pre_context": [
+                "/*! For license information please see bundle.js.LICENSE.txt */"
+              ],
+              "post_context": ["//# sourceMappingURL=bundle.js.map"],
+              "in_app": false,
+              "lineno": 2,
+              "colno": 74018,
+              "filename": "/dist/bundle.js",
+              "context_line": "{snip} ,(()=>{throw n(185).init({dsn:\"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\",release:\"1.0\"}),Error(\"this is an error\")})()})();"
+            },
+            {
+              "abs_path": "http://localhost:8080/dist/bundle.js",
+              "pre_context": [
+                "/*! For license information please see bundle.js.LICENSE.txt */"
+              ],
+              "post_context": ["//# sourceMappingURL=bundle.js.map"],
+              "in_app": false,
+              "lineno": 2,
+              "colno": 73991,
+              "filename": "/dist/bundle.js",
+              "context_line": "{snip} ,(()=>{throw n(185).init({dsn:\"http://a00ad5cad416418684270e433baf9c77@172.17.0.1:8000/4\",release:\"1.0\"}),Error(\"this is an error\")})()})();"
+            }
+          ]
+        },
+        "value": "this is an error",
+        "mechanism": { "type": "onerror", "handled": false },
+        "type": "Error"
+      }
+    ]
+  },
+  "extra": { "normalizeDepth": 3 },
+  "fingerprint": ["{{ default }}"],
+  "grouping_config": { "id": "legacy:2019-03-12" },
+  "hashes": ["d75931e06f591a159796e023fd11afae"],
+  "key_id": "11",
+  "level": "error",
+  "location": "webpack://small-js-error-factory/./src/index.ts",
+  "logger": "",
+  "metadata": {
+    "type": "Error",
+    "value": "this is an error",
+    "filename": "webpack://small-js-error-factory/./src/index.ts"
+  },
+  "received": 1648928998.91,
+  "request": {
+    "url": "http://localhost:8080/",
+    "headers": [
+      [
+        "User-Agent",
+        "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
+      ]
+    ]
+  },
+  "sdk": {
+    "version": "6.19.2",
+    "name": "sentry.javascript.browser",
+    "packages": [{ "version": "6.19.2", "name": "npm:@sentry/browser" }],
+    "integrations": [
+      "InboundFilters",
+      "FunctionToString",
+      "TryCatch",
+      "Breadcrumbs",
+      "GlobalHandlers",
+      "LinkedErrors",
+      "Dedupe",
+      "UserAgent"
+    ]
+  },
+  "timestamp": 1648928683.501,
+  "title": "Error: this is an error",
+  "type": "error",
+  "use_rust_normalize": true,
+  "user": { "ip_address": "71.249.111.206" },
+  "version": "7"
+}

+ 26 - 14
issues/tests/test_sentry_api_compat.py

@@ -36,7 +36,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
 
     # Upgrade functions handle intentional differences between GlitchTip and Sentry OSS
     def upgrade_title(self, value: str):
-        """ Sentry OSS uses ... while GlitchTip uses unicode …"""
+        """Sentry OSS uses ... while GlitchTip uses unicode …"""
         if value[-1] == "…":
             return value[:-4]
         return value.strip("...")
@@ -59,7 +59,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         return value
 
     def upgrade_data(self, data: Union[str, dict, list]):
-        """ A recursive replace function """
+        """A recursive replace function"""
         if isinstance(data, dict):
             return {k: self.upgrade_data(v) for k, v in data.items()}
         elif isinstance(data, list):
@@ -71,7 +71,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         return data
 
     def assertCompareData(self, data1: Dict, data2: Dict, fields: List[str]):
-        """ Compare data of two dict objects. Compare only provided fields list """
+        """Compare data of two dict objects. Compare only provided fields list"""
         for field in fields:
             field_value1 = data1.get(field)
             field_value2 = data2.get(field)
@@ -86,11 +86,13 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
                 field_value1 = self.upgrade_metadata(field_value1)
                 field_value2 = self.upgrade_metadata(field_value2)
             self.assertEqual(
-                field_value1, field_value2, f"Failed for field '{field}'",
+                field_value1,
+                field_value2,
+                f"Failed for field '{field}'",
             )
 
     def get_json_test_data(self, name: str):
-        """ Get incoming event, sentry json, sentry api event """
+        """Get incoming event, sentry json, sentry api event"""
         event = self.get_json_data(f"{TEST_DATA_DIR}/incoming_events/{name}.json")
         sentry_json = self.get_json_data(f"{TEST_DATA_DIR}/oss_sentry_json/{name}.json")
         # Force captured test data to match test generated data
@@ -179,7 +181,8 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         self.assertCompareData(res_data, sentry_data, ["datetime"])
         self.assertEqual(res_data["entries"][1].get("type"), "breadcrumbs")
         self.assertEqual(
-            res_data["entries"][1], self.upgrade_data(sentry_data["entries"][1]),
+            res_data["entries"][1],
+            self.upgrade_data(sentry_data["entries"][1]),
         )
 
     def test_dotnet_error(self):
@@ -226,7 +229,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         self.assertEqual(res.data["entries"][1], data["entries"][1])
 
     def test_csp_event_glitchtip_key(self):
-        """ Check compatibility for using glitchtip_key or sentry_key interchangably """
+        """Check compatibility for using glitchtip_key or sentry_key interchangably"""
         key = self.project.projectkey_set.first().public_key
         csp_store_url = (
             reverse("csp_store", args=[self.project.id]) + "?glitchtip_key=" + key.hex
@@ -240,7 +243,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         self.assertEqual(res.status_code, 200)
 
     def test_message_event(self):
-        """ A generic message made with the Sentry SDK. Generally has less data than exceptions. """
+        """A generic message made with the Sentry SDK. Generally has less data than exceptions."""
         # Don't mimic this test, use self.get_jest_test_data instead
         res = self.client.post(self.event_store_url, message, format="json")
         self.assertEqual(res.status_code, 200)
@@ -257,7 +260,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         )
 
     def test_python_logging(self):
-        """ Test Sentry SDK logging integration based event """
+        """Test Sentry SDK logging integration based event"""
         sdk_error, sentry_json, sentry_data = self.get_json_test_data("python_logging")
         res = self.client.post(self.event_store_url, sdk_error, format="json")
         event = Event.objects.get(pk=res.data["id"])
@@ -297,7 +300,9 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         res = self.client.get(url)
         self.assertEqual(res.status_code, 200)
         self.assertCompareData(
-            res.data, sentry_data, ["title", "culprit", "type", "metadata", "platform"],
+            res.data,
+            sentry_data,
+            ["title", "culprit", "type", "metadata", "platform"],
         )
 
     def test_very_small_event(self):
@@ -393,7 +398,14 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         self.assertCompareData(
             res.data,
             sentry_data,
-            ["eventID", "title", "culprit", "platform", "type", "metadata",],
+            [
+                "eventID",
+                "title",
+                "culprit",
+                "platform",
+                "type",
+                "metadata",
+            ],
         )
         res_exception = next(filter(is_exception, res.data["entries"]), None)
         sentry_exception = next(filter(is_exception, sentry_data["entries"]), None)
@@ -463,7 +475,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         self.assertCompareData(res.json(), sentry_data, ["context", "user"])
 
     def test_elixir_stacktrace(self):
-        """ The elixir SDK does things differently """
+        """The elixir SDK does things differently"""
         sdk_error, sentry_json, sentry_data = self.get_json_test_data("elixir_error")
         res = self.client.post(self.event_store_url, sdk_error, format="json")
         event = Event.objects.get(pk=res.data["id"])
@@ -475,7 +487,7 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         )
 
     def test_small_js_error(self):
-        """ A small example to test stacktraces """
+        """A small example to test stacktraces"""
         sdk_error, sentry_json, sentry_data = self.get_json_test_data("small_js_error")
         res = self.client.post(self.event_store_url, sdk_error, format="json")
         event = Event.objects.get(pk=res.data["id"])
@@ -483,5 +495,5 @@ class SentryAPICompatTestCase(GlitchTipTestCase):
         self.assertCompareData(
             event_json["exception"]["values"][0],
             sentry_json["exception"]["values"][0],
+            ["type", "values", "exception"],
         )
-