mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
PeerTube: 'Follow' requests are acknowledged with a 204 status code
This commit is contained in:
parent
e83b929a73
commit
2abadb183f
1 changed files with 3 additions and 1 deletions
|
@ -101,7 +101,7 @@ def post_request(uri: str, body: dict | None, private_key: str, key_id: str, con
|
|||
else:
|
||||
try:
|
||||
result = HttpSignature.signed_request(uri, body, private_key, key_id, content_type, method, timeout)
|
||||
if result.status_code != 200 and result.status_code != 202:
|
||||
if result.status_code != 200 and result.status_code != 202 and result.status_code != 204:
|
||||
log.result = 'failure'
|
||||
log.exception_message += f' Response status code was {result.status_code}'
|
||||
current_app.logger.error('Response code for post attempt was ' +
|
||||
|
@ -109,6 +109,8 @@ def post_request(uri: str, body: dict | None, private_key: str, key_id: str, con
|
|||
log.exception_message += uri
|
||||
if result.status_code == 202:
|
||||
log.exception_message += ' 202'
|
||||
if result.status_code == 204:
|
||||
log.exception_message += ' 204'
|
||||
except Exception as e:
|
||||
log.result = 'failure'
|
||||
log.exception_message='could not send:' + str(e)
|
||||
|
|
Loading…
Add table
Reference in a new issue