private List < ErrorReport > getErrorReportOrNull ( final String body ) { ObjectMapper objectMapper = new ObjectMapper ( ) ; try { JsonNode jsonNode = objectMapper . readValue ( body , JsonNode . class ) ; ErrorReport [ ] errors = objectMapper . readValue ( jsonNode . get ( "errors" ) . toString ( ) , ErrorReport [ ] . class ) ; List < ErrorReport > result = Arrays . asList ( errors ) ; if ( result . isEmpty ( ) ) { return null ; } return result ; } catch ( IOException e ) { return null ; } }
Get the MessageBird error report data .