-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
New exception page. #1386
New exception page. #1386
Conversation
Beautiful. 👍 |
This handler may raise an exception if one of locals is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice.
if any( | ||
[ | ||
"key" in key, | ||
"token" in key, | ||
"password" in key, | ||
"secret" in key, | ||
] | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if any( | |
[ | |
"key" in key, | |
"token" in key, | |
"password" in key, | |
"secret" in key, | |
] | |
): | |
if any(k in key for k in ["key", "token", "password", "secret"]): |
Is this less readable? What do you think?
"secret" in key, | ||
] | ||
): | ||
return "*" * 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't really checked any other projects, but do you think it would be useful to mask a part of the value? For example masking first half of the string? Or at least mask the length of the value, as I think this might be confusing.
This looks fantastic. Presumably you'd also be able to package this up as a third party package, and document how to install it as a custom exception handler, right? (Or are there any blockers there that I've not figured out?) A good rule of thumb for proposals to Starlette should probably be "if it can be a third party package, it should be". That's worked really well for REST framework, and it'd work really well for Starlette too - help make sure we can just keep it small and well-scoped, but still allow folks to build fantastic stuff on top of it. |
Yes, I have the same thought. |
Fantastic stuff. |
This PR updates debugger UI.
Features:
UI is influenced by the Phoenix Framework error page