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

dont escape when developer error header is present #5681

Merged
merged 5 commits into from
Oct 8, 2024

Conversation

pxpm
Copy link
Contributor

@pxpm pxpm commented Oct 4, 2024

WHY

fixes: #5142

BEFORE - What was wrong? What was happening before this PR?

All errors have the message escaped. In some scenarios we would like to display some html, like a link to docs or similar.

AFTER - What is happening after this PR?

We introduce a way to have "internal" exceptions, errors that occur when developer missed some configuration.

HOW

How did you achieve that, in technical terms?

Introduced a header developer-error-exception that when present in the exception we don't escape the message, since those errors are internally triggered by backpack, and we control the contents.

Is it a breaking change?

I don't think so, no.

@tabacitu
Copy link
Member

tabacitu commented Oct 7, 2024

Uuu that's a very nice solution. I like it, yes! I see no problem, run with it!

@pxpm pxpm changed the title [WIP] dont escape when dev error header is present dont escape when developer error header is present Oct 7, 2024
@pxpm pxpm merged commit bf39d82 into main Oct 8, 2024
8 checks passed
@pxpm pxpm deleted the poc-user-special-header-to-escape-message branch October 8, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] Error messages do not output real HTML but write it out
3 participants