File tree 1 file changed +4
-0
lines changed
src/main/java/br/com/labbs/monitor/filter
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ public void init(FilterConfig filterConfig) {
110
110
String version = getApplicationVersionFromPropertiesFile ();
111
111
// Allow users to capture error messages
112
112
errorMessageParam = filterConfig .getInitParameter (ERROR_MESSAGE_PARAM );
113
+
113
114
MonitorMetrics .INSTANCE .init (exportJvmMetrics , version , buckets );
114
115
}
115
116
@@ -210,6 +211,9 @@ private boolean isErrorStatus(int status) {
210
211
* @return string with the error message or empty string if error message not found.
211
212
*/
212
213
private String getErrorMessage (HttpServletRequest httpRequest ) {
214
+ if (errorMessageParam == null ) {
215
+ return "" ;
216
+ }
213
217
String errorMessage = (String ) httpRequest .getAttribute (errorMessageParam );
214
218
if (errorMessage == null ) {
215
219
return "" ;
You can’t perform that action at this time.
0 commit comments