metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonellistonball <...@git.apache.org>
Subject [GitHub] metron pull request #779: METRON-1218: Metron REST should return better erro...
Date Fri, 29 Sep 2017 13:35:25 GMT
Github user simonellistonball commented on a diff in the pull request:

    https://github.com/apache/metron/pull/779#discussion_r141869253
  
    --- Diff: metron-interface/metron-rest/src/main/java/org/apache/metron/rest/controller/RestExceptionHandler.java
---
    @@ -45,4 +45,14 @@ private HttpStatus getStatus(HttpServletRequest request) {
         }
         return HttpStatus.valueOf(statusCode);
       }
    +
    +  private String getFullMessage(Throwable ex) {
    +    String fullMessage = ex.getMessage();
    +    Throwable cause = ex.getCause();
    +    while(cause != null) {
    +      fullMessage = cause.getMessage();
    +      cause = cause.getCause();
    +    }
    +    return fullMessage;
    --- End diff --
    
    @merrimanr I'm suggesting we log it somewhere, right now there is no apparent indication
in the rest logs, so people end up hunting. When I hit the missing alter: nested template
the other day, it took a PCAP of the transport protocol to find out what the actual root error
was.


---

Mime
View raw message