code: public static <T extends Errors> T parseError(ObjectMapper mapper, JsonNode errorResponse, Class<T> cls) throws JsonProcessingException {
          return mapper.treeToValue(errorResponse, cls);
      }
docs: Parses provided JsonNode and returns it as T.
  
  @param mapper        Jackson Object mapper instance
  @param errorResponse error response body
  @return T collection
  @throws JsonProcessingException thrown in case JsonNode cannot be parsed