Calling `vercel.deployments.getDeployments` returns ... prev: 'string' when number is expected
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 160
- Forks
- 42
- Avg merge
- 19h 36m
- Merged PRs (30d)
- 16
Description
the response i get is `{ deployments: [], pagination: { count: 0, next: null, prev: '0' } }`
this is causing an error in the zod validation:
Cause: ZodError: [
{
"code": "invalid_type",
"expected": "number",
"received": "string",
"path": [
"pagination",
"prev"
],
"message": "Expected number, received string"
}
]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TypeScript implementation and Zod schema behind vercel.deployments.getDeployments, then reproduce the response showing pagination.prev as '0'. Compare the declared pagination type with the API response and add or update coverage so the endpoint validates the observed contract consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100