vercel / vercel/sdk

createRecord fails with “missing attribute name” even when name is provided

Open
#57 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

I’m facing an issue when trying to create a DNS record using the createRecord method. The error says that the name attribute is required, but I am already including it in the request.

  const result = await vercel.dns.createRecord({
    domain: "my-domain.dev",
    teamId: "team_XJxxxxxxxx",
    slug: " my-org-slug",
    requestBody: {
      comment: "testing",
      name: "test",
      ttl: 60,
      type: "A",
      value: "03.228.48.138",
    })

I’ve tried several different ways, but nothing has worked.
I also tried the example in this doc: Create a DNS record - Vercel API Docs, but it throws this error:

Error: API error occurred: {"error":{"code":"bad_request","message":"Invalid request: should NOT have additional property https."}}

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 at the TypeScript createRecord entry point and compare its request with the linked Create a DNS record API example. Reproduce the supplied call and investigate the conflicting missing-name and unexpected-https errors; done means the request is accepted and creates the DNS record.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.