• Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • NCMP
    • None

      With the introduction of WebClient the error handling should be refactored to leverage on the capabilities of the new library.
      But at the same time we must preserve the current error handling mechanisms to comply with the customer's requirements

       

      example error handling:

      return webClient
      .get()
      .uri(resourceUrl)
      .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
      .retrieve()
      .onStatus(HttpStatus::is4xxClientError,
      error -> Mono.error(new RuntimeException("API not found")))
      .onStatus(HttpStatus::is5xxServerError,
      error -> Mono.error(new RuntimeException("Server is not responding")))
      .bodyToMono(String.class);

            leventecsanyi Levente Csanyi
            leventecsanyi Levente Csanyi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: