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

Hide stack trace from logError #31

Open
Irina-Intuiface opened this issue Feb 28, 2023 · 1 comment
Open

Hide stack trace from logError #31

Irina-Intuiface opened this issue Feb 28, 2023 · 1 comment

Comments

@Irina-Intuiface
Copy link

Hi, I am using the following code in order to customize the error message shown to the user when a http request fails.

req.on('error', () => {
                const error = new Error('Custom error message.');
                error.stack = null;
                unhandled.logError(error, {
                    title: 'Custom error title'
                });
            });

However, the error popup also shows a stack trace at the end of my message, that I would like to hide, is there any way I can achieve this?
image

@sindresorhus
Copy link
Owner

There could be a showStackTrace: boolean option.


This is not something I plan to work on though. I don't use Electron anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants