mutablesecurity icon indicating copy to clipboard operation
mutablesecurity copied to clipboard

Stacktrace Print on Error in Development Environments

Open iosifache opened this issue 2 years ago • 2 comments

Improvement Description

The except in the cli module catches all exception. This makes MutableSecurity more user-friendly. As a regular user, you don't want to see a messy stack trace directly into your terminal. You only want to know the reason, a thing that can be achieved with a pretty error message.

The same does not apply to development environments. If an error occurs after changing the codebase, you are interested in seeing more than a shallow reason, namely a stack trace. It helps to have a starting point in the debugging process.

Possible Solution

In the cli module, the except can check if the user is a developer (using the configuration module). If it is, then the stacktrace is printed.

Contact Details

No response

iosifache avatar Nov 06 '22 20:11 iosifache

Hey @iosifache I would like to work on fixing this issue. I was wondering how you see the configuration module being helpful for determining if the user is a developer

camdenmcgath avatar Dec 23 '22 23:12 camdenmcgath

Hi @camdenmcgath 👋,

There is a configuration member named developer_mode. You can check this example for verifying if a user is a developer (namely, if it's set to True).

iosifache avatar Dec 30 '22 07:12 iosifache