Conversation
docs/tutorial/exceptions.md
Outdated
| If your Typer application handles **delicate information**, for example a **password**, a **key**, a **token**, then it could be problematic if the automatic errors show the value in those <abbr title="a variable that lives only inside a function, its value is only visible inside of it">local variables</abbr>. | ||
| When using Rich, you can get more verbose output by printing the values of the <abbr title="a variable that lives only inside a function, its value is only visible inside of it">local variables</abbr> as part of the error message. | ||
|
|
||
| By default, this setting is disabled (since Typer v0.18.0) to avoid showing **delicate information**, for example a **password**, a **key** or a **token**. |
There was a problem hiding this comment.
TODO: update version number here when/if we do decide to release this change
This comment was marked as outdated.
This comment was marked as outdated.
|
I've updated this PR by changing the documentation to explain first the (new) default setting, showing no local variables. Then, showing how to enable them. Updated the tests accordingly as well. |
There was a problem hiding this comment.
In theory, this is a breaking change in behaviour, as the default case will now show less information in error logs. But it's not breaking in the sense of "applications downstream will be breaking", and we're now error'ing on the side of caution, so that's better IMO.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
I'll mark it as "breaking change" just in case, I don't think it will be any problem, but just to be safe. 🤓 This should be available in Typer 0.23.0, released in the next few hours. 🚀 |
♻️ When printing error tracebacks with Rich, default to not showing locals, which are sometimes verbose