vercel / vercel/sdk

Calling `vercel.deployments.getDeployments` returns ... prev: 'string' when number is expected

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.