Closed
Description
The python from_global_id
does not exhibit the same behavior as the reference TypeScript implementation when handling invalid input.
Examples:
from_global_id("invalid")
raisesbinascii.Error
from_global_id("")
raisesTypeError
from_global_id(b64encode(b"foo"))
raisesTypeError
In the first two cases, the reference implementation returns {type: "", id: ""}
. In the third case, it returns {type: "", id: "foo"}
. In no case does it throw an error.
This might seem like nitpicking, but it can cause significant differences in how user input ends up being handled.
Metadata
Metadata
Assignees
Labels
No labels