handle get_data exceptions better
Makes exception handling more precise, only raising status for 401s. Also fixes a string pylint was complaining about.
This commit is contained in:
parent
f8c9df4aff
commit
e8452011f7
2 changed files with 7 additions and 2 deletions
|
@ -306,7 +306,8 @@ def resolve_remote_id(
|
|||
|
||||
|
||||
def get_representative():
|
||||
"""Get or create an actor representing the entire instance to sign requests to 'secure mastodon' servers"""
|
||||
"""Get or create an actor representing the instance
|
||||
to sign requests to 'secure mastodon' servers"""
|
||||
username = f"{INSTANCE_ACTOR_USERNAME}@{DOMAIN}"
|
||||
try:
|
||||
user = models.User.objects.get(username=username)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue