-
Notifications
You must be signed in to change notification settings - Fork 2
change/webclient_error_handling #3785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…acing Handler subclass.
… proxies for now.
…variable set by NAIS.
…t.mutate() usage.
… be taken over by WebClientError.
…m instantiating class.
… errors. Also, removed some warnings from Sonar in affected files.
…e for actual debugging.
# Conflicts: # apps/synt-vedtakshistorikk-service/build.gradle # apps/synt-vedtakshistorikk-service/settings.gradle # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/DollySearchServiceConsumer.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/arena/SlettArenaBrukerCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/fastedata/GetOrganisasjonerCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/pdl/GetPdlPersonCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/pdl/GetPdlPersonerCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/pdl/TagsOpprettingCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/pdl/TagsSlettingCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/pensjon/PostPensjonTestdataInntektCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/pensjon/PostPensjonTestdataPersonCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/search/PersonSearchCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/synt/HentDagpengevedtakCommand.java # apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/consumer/command/synt/HentVedtakshistorikkCommand.java
…ved WebClientError.log (using caller's own logger).
….logTo, for convenience.
# Conflicts: # libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/utils/WebClientFilter.java
…r with no.nav.dolly.libs.logging.DollyLogstashEncoder.
…er with no.nav.dolly.libs.logging.DollyLogstashEncoder.
stigus
approved these changes
Mar 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ser nice ut 👍
# Conflicts: # apps/dolly-search-service/src/main/java/no/nav/testnav/dollysearchservice/consumer/PdlProxyConsumer.java # apps/dolly-search-service/src/main/resources/logback-spring.xml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WebClientError
, med convenience-metoder for retries og logging. Erstatter (mange forskjellige implementasjoner av)WebClientFilter
.WebClientError.logTo(...)
har som mål å gi en bedre loggføring (dvs. angi relevant klasse) uten å måtte bruke.checkpoint()
.WebClient
. Fjerner bruk avWebClient.Builder
, bruker.mutate()
i stedet for å sikre felles konfigurert bean.DollyLogbackEncoder
erstatterno.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder
ogno.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder
.DollyLogbackEncoder
logger nå også suppressed exceptions (fra React stack).Fra Copilot:
This pull request includes several changes across different files to improve the handling of web client errors and refactor some of the web client configurations. The most important changes include updating descriptions in workflow files, modifying dependencies and imports, and refactoring web client configurations.
Workflow improvements:
.github/workflows/all.workflows.yml
: Updated the description for theworkflow
input and changed the default value ofsonar-enabled
to false. [1] [2]Dependency and import updates:
apps/adresse-service/build.gradle
,apps/adresse-service/settings.gradle
: Addedreactive-core
library to dependencies and included it in the build. [1] [2]Web client configuration refactoring:
apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/consumer/PdlAdresseConsumer.java
: Refactored to useWebClient
directly instead ofWebClient.Builder
. [1] [2]apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/altinn/AltinnConsumer.java
,apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/brreg/BrregConsumer.java
: Similar refactoring to useWebClient
directly. [1] [2]Error handling improvements:
WebClientFilter
withWebClientError
fromreactivecore
library across multiple files for better error handling and logging. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]Code simplification:
apps/altinn3-tilgang-service/src/main/java/no/nav/testnav/altinn3tilgangservice/consumer/maskinporten/MaskinportenConsumer.java
: Simplified constructor using@RequiredArgsConstructor
and removed redundant constructor. [1] [2]