mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-03 08:56:04 -04:00
Name the type of token in "Invalid token" messages (#10815)
I had one of these error messages yesterday and assumed it was an invalid auth token (because that was an HTTP query parameter in the test) I was working on. In fact, it was an invalid next batch token for syncing.
This commit is contained in:
parent
01c88a09cd
commit
319b8b6bef
4 changed files with 7 additions and 6 deletions
|
@ -73,7 +73,7 @@ class RelationPaginationToken:
|
|||
t, s = string.split("-")
|
||||
return RelationPaginationToken(int(t), int(s))
|
||||
except ValueError:
|
||||
raise SynapseError(400, "Invalid token")
|
||||
raise SynapseError(400, "Invalid relation pagination token")
|
||||
|
||||
def to_string(self) -> str:
|
||||
return "%d-%d" % (self.topological, self.stream)
|
||||
|
@ -103,7 +103,7 @@ class AggregationPaginationToken:
|
|||
c, s = string.split("-")
|
||||
return AggregationPaginationToken(int(c), int(s))
|
||||
except ValueError:
|
||||
raise SynapseError(400, "Invalid token")
|
||||
raise SynapseError(400, "Invalid aggregation pagination token")
|
||||
|
||||
def to_string(self) -> str:
|
||||
return "%d-%d" % (self.count, self.stream)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue