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

Elysia does not display error details when in production mode #1059

Open
emilcondrea opened this issue Feb 12, 2025 · 0 comments
Open

Elysia does not display error details when in production mode #1059

emilcondrea opened this issue Feb 12, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@emilcondrea
Copy link

What version of Elysia is running?

1.2.12

What platform is your computer?

Darwin 23.1.0 arm64 arm

What steps can reproduce the bug?

set NODE_ENV=production
make a request to an API with a required field, it will not display summary

What is the expected behavior?

Display detailed error why something failed

{
  "type": "validation",
  "on": "params",
  "summary": "Expected string length greater or equal to 10",
  "property": "/fieldname",
  "message": "Expected string length greater or equal to 10",
  "expected": {
    "fieldname": "somevalue"
  },
  "found": {
    "fieldname": "a"
  },
  "errors": [
    {
      "summary": "Expected string length greater or equal to 10",
      "type": 52,
      "schema": {
        "minLength": 10,
        "default": "somevalue",
        "type": "string"
      },
      "path": "/fieldname",
      "value": "a",
      "message": "Expected string length greater or equal to 10",
      "errors": []
    }
  ]
}

What do you see instead?

{
"type": "validation",
"on": "params",
"found": {
"fieldname": "a"
}
}

Additional information

No response

Have you try removing the node_modules and bun.lockb and try again yet?

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant