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 trace to our errors #84

Open
3 tasks
BioPhoton opened this issue Nov 2, 2022 · 0 comments
Open
3 tasks

Add trace to our errors #84

BioPhoton opened this issue Nov 2, 2022 · 0 comments
Labels
bug Something isn't working DX Developer Experience good first issue Good for newcomers

Comments

@BioPhoton
Copy link
Contributor

BioPhoton commented Nov 2, 2022

It is nice to have a user friendly error message but we also need to have a way to understand the real cause. therefore I suggest to add the traces from the original error to the new one.

Example of missing traces:
Error while running user flows. TypeError: Cannot set properties of undefined (setting 'config')

It would be really helpful to see the actual file and the full trace here.

Solution:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause

try {
  connectToDatabase();
} catch (err) {
  throw new Error('Connecting to database failed.', { cause: err });
}

TODO:

  • Improve Error for serve command - Error while executing npm run start:ssr:prod
  • adopt tsconfig to latest es version so the 'cause' feature works
  • add cause to all catched or thrown errors
@BioPhoton BioPhoton added bug Something isn't working DX Developer Experience labels Nov 2, 2022
@BioPhoton BioPhoton added the good first issue Good for newcomers label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DX Developer Experience good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant