`projects[].security.managedRules.traffic_sources` Expected array, received object
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 160
- Forks
- 42
- Avg merge
- 19h 36m
- Merged PRs (30d)
- 16
Description
Using 1.28.6 I get this error when calling getProjects.
[
{
"code": "invalid_union",
"unionErrors": [
{
"issues": [
{
"code": "invalid_union",
"unionErrors": [
{
"issues": [
{
"code": "invalid_type",
"expected": "null",
"received": "object",
"path": [
"projects",
9,
"security"
],
"message": "Expected null, received object"
}
],
"name": "ZodError"
},
{
"issues": [
{
"code": "invalid_type",
"expected": "object",
"received": "undefined",
"path": [
"projects",
9,
"security",
"managedRules",
"traffic_sources"
],
"message": "Required"
}
],
"name": "ZodError"
}
],
"path": [
"projects",
9,
"security"
],
"message": "Invalid input"
}
],
"name": "ZodError"
},
{
"issues": [
{
"code": "invalid_union",
"unionErrors": [
{
"issues": [
{
"code": "invalid_type",
"expected": "null",
"received": "object",
"path": [
"projects",
9,
"security"
],
"message": "Expected null, received object"
}
],
"name": "ZodError"
},
{
"issues": [
{
"code": "invalid_type",
"expected": "object",
"received": "undefined",
"path": [
"projects",
9,
"security",
"managedRules",
"traffic_sources"
],
"message": "Required"
}
],
"name": "ZodError"
}
],
"path": [
"projects",
9,
"security"
],
"message": "Invalid input"
}
],
"name": "ZodError"
},
{
"issues": [
{
"code": "invalid_type",
"expected": "array",
"received": "object",
"path": [],
"message": "Expected array, received object"
}
],
"name": "ZodError"
}
],
"path": [],
"message": "Invalid input"
}
]
EDIT: I removed references to #206 the new error isn't exactly the same
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 getProjects entry point and locate the schema for projects[].security.managedRules.traffic_sources. Compare that schema with the object returned by the Vercel API, then verify that getProjects accepts the reported response and add or update coverage if the repository provides a relevant test.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100