Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better error messages #704

Closed
BioPhoton opened this issue Jun 12, 2024 · 0 comments · Fixed by #890
Closed

Add better error messages #704

BioPhoton opened this issue Jun 12, 2024 · 0 comments · Fixed by #890
Assignees
Labels
🧩 core ➕ enhancement new feature or request 🆘 help wanted assistance is required

Comments

@BioPhoton
Copy link
Collaborator

BioPhoton commented Jun 12, 2024

What happened?

I used onlyAudits: ['csp-xss'] in the lighthouse config object and run nx code-pushup -- collect i get the following error:

ZodError: [
  {
    "code": "custom",
    "message": "In a category there has to be at least one ref with weight > 0",
    "path": [
      "plugins",
      5,
      "groups",
      0,
      "refs"
    ]
  }
]
Screenshot 2024-08-03 at 15 27 40

What would you expect to happen?

It should show more information of where the error was caused.

Examples File error:

  • Error: Failed parsing core config. Path: code-pushup.config.ts.

Examples Parsing error:

  • plugins[1].title: Required
  • plugins[1].audits: Array must contain at least 1 element(s)
  • plugins[1].groups[0].title: Required
  • plugins[1].groups[0].refs[0].weight: Required
  • persist.format[0]: Invalid enum value. Expected 'json' | 'md', received 'html'
  • plugins[1].slug: The slug has to follow the pattern [0-9a-z] followed by multiple optional groups of -[0-9a-z].
Screenshot 2024-08-03 at 15 26 31

What steps did you take?

I used onlyAudits: ['csp-xss'] in the lighthouse config object and run nx code-pushup -- collect i get the following error:

Code PushUp package version

No response

What operation system are you on?

Linux

Node version

No response

Relevant log output

No response

Related

causaly/zod-validation-error#357

@BioPhoton BioPhoton added 🐛 bug something isn't working 🧩 core labels Jun 12, 2024
@vmasek vmasek added ➕ enhancement new feature or request and removed 🐛 bug something isn't working labels Jun 20, 2024
@BioPhoton BioPhoton added the 🆘 help wanted assistance is required label Jul 19, 2024
@hanna-skryl hanna-skryl self-assigned this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧩 core ➕ enhancement new feature or request 🆘 help wanted assistance is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants