Skip to content

Commit

Permalink
Fix fetching of store API URL
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Dec 31, 2024
1 parent 4f5201f commit 5501a13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions newpipe_crash_report_importer/storage/glitchtip_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import List, Union, Optional

import aiohttp
from sentry_sdk.utils import Dsn
from sentry_sdk.utils import Dsn, Auth

from . import Storage, AlreadyStoredError
from ..database_entry import DatabaseEntry
Expand Down Expand Up @@ -238,7 +238,7 @@ class GlitchtipStorage(Storage):
"""

def __init__(self, dsn: str, package: str):
self.sentry_auth = Dsn(dsn).to_auth()
self.sentry_auth: Auth = Dsn(dsn).to_auth()
self.package = package

def make_sentry_payload(self, entry: DatabaseEntry):
Expand Down Expand Up @@ -368,7 +368,7 @@ async def save(self, entry: DatabaseEntry):

# we use Sentry SDK's auth helper object to calculate both the required auth header as well as the URL from the
# DSN string we already created a Dsn object for
url = self.sentry_auth.store_api_url
url = self.sentry_auth.get_api_url()

# it would be great if the Auth object just had a method to create/update a headers dict
headers = {
Expand Down

0 comments on commit 5501a13

Please sign in to comment.