mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Fix destination_is
errors seen in sentry. (#13041)
* Rename test_fedclient to match its source file * Require at least one destination to be truthy * Explicitly validate user ID in profile endpoint GETs Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
This commit is contained in:
parent
aef398457f
commit
c99b511db9
7 changed files with 59 additions and 8 deletions
|
@ -731,8 +731,11 @@ class MatrixFederationHttpClient:
|
|||
Returns:
|
||||
A list of headers to be added as "Authorization:" headers
|
||||
"""
|
||||
if destination is None and destination_is is None:
|
||||
raise ValueError("destination and destination_is cannot both be None!")
|
||||
if not destination and not destination_is:
|
||||
raise ValueError(
|
||||
"At least one of the arguments destination and destination_is "
|
||||
"must be a nonempty bytestring."
|
||||
)
|
||||
|
||||
request: JsonDict = {
|
||||
"method": method.decode("ascii"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue