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

Improve View Template Error Message #1178

Merged
merged 1 commit into from Sep 1, 2015

Conversation

Projects
None yet
3 participants
@nickbabcock
Contributor

nickbabcock commented Jul 21, 2015

Instead of hiding behind a sometimes deceptive error message saying that the
template file was not found, propagate the error message in an HTML safe
way
return a generic error message with the actual error going to the log
file. This makes the behavior more in line with validation errors (though this
doesn't deal with validation errors, itself)

Closes #1077

@nickbabcock

This comment has been minimized.

Show comment
Hide comment
@nickbabcock

nickbabcock Jul 27, 2015

Contributor

So based on @nathancomstock's comment, I've refocused the pull request such that instead of throwing up an error page that says that the file isn't found, return a generic page to the client saying that something went wrong. Then the developer can see the error under debug mode.

This pull request also explains the behavior in the views documentation.

Contributor

nickbabcock commented Jul 27, 2015

So based on @nathancomstock's comment, I've refocused the pull request such that instead of throwing up an error page that says that the file isn't found, return a generic page to the client saying that something went wrong. Then the developer can see the error under debug mode.

This pull request also explains the behavior in the views documentation.

Improve View Template Error Message
Instead of hiding behind a sometimes deceptive error message saying that
the template file was not found, return a generic HTML message to the
client.

Note in the documentation that the actual error message can be retrieved
under debug mode.
@nickbabcock

This comment has been minimized.

Show comment
Hide comment
@nickbabcock

nickbabcock Jul 28, 2015

Contributor

Oi, good catch. Fixed 😊

Contributor

nickbabcock commented Jul 28, 2015

Oi, good catch. Fixed 😊

arteam added a commit that referenced this pull request Sep 1, 2015

Merge pull request #1178 from nickbabcock/mustache
Improve View Template Error Message

@arteam arteam merged commit 5072444 into dropwizard:master Sep 1, 2015

@arteam

This comment has been minimized.

Show comment
Hide comment
@arteam

arteam Sep 1, 2015

Member

LGTM!

Member

arteam commented Sep 1, 2015

LGTM!

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