We are using undocumented internal API endpoints. This mean we have to expect them to change or even stop working entirely at any time without notice. How do we want to deal with that?
Currently, we don't have any validation of the returned response whatsoever. If the response is not as we expected, we will just crash.
We are using undocumented internal API endpoints. This mean we have to expect them to change or even stop working entirely at any time without notice. How do we want to deal with that?
Currently, we don't have any validation of the returned response whatsoever. If the response is not as we expected, we will just crash.
In parse-play, I added a few basic assertions:
https://github.com/baltpeter/parse-play/blob/3227d26f8c5a2f8fdab2bcd90287c8c60a1ceff8/src/top-charts.ts#L97
But I only fire them when an env var is set:
https://github.com/baltpeter/parse-play/blob/3227d26f8c5a2f8fdab2bcd90287c8c60a1ceff8/src/common/assert.ts#L5
A cleaner implementation would be to use zod.