public static < T extends Errors > T parseError ( ObjectMapper mapper , JsonNode errorResponse , Class < T > cls ) throws JsonProcessingException { return mapper . treeToValue ( errorResponse , cls ) ; }
Parses provided JsonNode and returns it as T .