Skip to content

Commit

Permalink
It's up to the error page to display the error or not
Browse files Browse the repository at this point in the history
  • Loading branch information
dgageot committed Sep 3, 2015
1 parent 02a548a commit b0c7415
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/java/net/codestory/http/payload/PayloadWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,7 @@ protected Payload errorPage(int errorCode, Throwable e) {
}

protected Payload errorPageHtml(int errorCode, Throwable e) {
Throwable shownError = env.prodMode() ? null : e;
return new ErrorPage(errorCode, shownError).payload();
return new ErrorPage(errorCode, e).payload();
}

protected Payload errorAsJson(int errorCode, Throwable e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/app/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1>An error occurred on the server</h1>

<p class="credits"><em>Credits : <a href="http://www.flickr.com/photos/threeheadedmonkey/">ThreeHeadedMonkey</a></em></p>

<pre>[[ERROR]]</pre>
[[#unless env.prodMode]]<pre>[[ERROR]]</pre>[[/unless]]

</body>
[[livereload]]
Expand Down

0 comments on commit b0c7415

Please sign in to comment.