createRecord fails with “missing attribute name” even when name is provided
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
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 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