Closed RoyDefined closed 1 month ago
Another one.
ZodError: [
{
"code": "too_big",
"maximum": 4,
"type": "number",
"inclusive": true,
"exact": false,
"message": "Number must be less than or equal to 4",
"path": [
37,
"voiceChatType"
]
}
]
This is an issue in general, not just these two specific ones. There should be a way to default to a value if the type is wrong, rather than throwing an error. This issue has more information: https://github.com/colinhacks/zod/issues/1426.
Fixed in 628c2129737cb86b3e787b6737d2cc000ab170d0. Depending on the incoming data there might have to be more catch blocks, but the most apparent ones are now caught.
Describe the bug A Zod error is thrown when fetching detailed information of particular servers. One error is about a player name being parsed incorrectly so this name should either be accepted as "empty" or the player should not be drawn at all. The other is about PWad names, which has the same issue.
Steps to reproduce N/A
Expected behavior Zod parses the data correctly.
Screenshots N/A
Additional context