-
Notifications
You must be signed in to change notification settings - Fork 60
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
RA-1889:Return Relatively Formatted Error Instead Of Returning Full Exception #43
base: master
Are you sure you want to change the base?
Changes from all commits
37aa36a
6c7e64a
64ffe44
3302488
85a1720
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html> | ||
<body> | ||
<p>Application has encountered an error. Please contact support on ...</p> | ||
<% out << "encounter.form is not an HTML Form" %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this the error you are returning? down your controller ,add the error message to an attribute for example errorMessage and access it from the gsp as ${errorMessage } There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks @HerbertYiga , ,Am not well convinced with this approach and am sure there is a clean way of doing this which am looking forward too. |
||
<!-- | ||
Failed URL: ${url} | ||
Exception: ${exception.message} | ||
<c:forEach items="${exception.stackTrace}" var="ste"> ${ste} | ||
</c:forEach> | ||
--> | ||
</body> | ||
</html> |
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.
doesn't this catch any Null Pointer Exception? How do we know that the "encounter.form" NPE was the one that caused it?
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.
Have changed it to illegalArgumentException, this method would handle any exception that would occur when any api with in the controller class returns an exception is called