Skip to content

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 40 commits into from
Mar 21, 2025
Merged

Conversation

rfc3092
Copy link
Contributor

@rfc3092 rfc3092 commented Mar 5, 2025

  • Ny klasse 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().
  • Autoconfiguration av WebClient. Fjerner bruk av WebClient.Builder, bruker .mutate() i stedet for å sikre felles konfigurert bean.
  • Ny DollyLogbackEncoder erstatter no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder og no.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:

Dependency and import updates:

  • apps/adresse-service/build.gradle, apps/adresse-service/settings.gradle: Added reactive-core library to dependencies and included it in the build. [1] [2]

Web client configuration refactoring:

Error handling improvements:

Code simplification:

rfc3092 added 30 commits March 4, 2025 14:17
… errors. Also, removed some warnings from Sonar in affected files.
# 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).
@rfc3092 rfc3092 marked this pull request as ready for review March 17, 2025 22:06
@rfc3092 rfc3092 requested a review from a team as a code owner March 17, 2025 22:06
Copy link
Contributor

@stigus stigus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ser nice ut 👍

rfc3092 added 2 commits March 21, 2025 10:30
# 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
@rfc3092 rfc3092 merged commit 91692de into master Mar 21, 2025
4 checks passed
@rfc3092 rfc3092 deleted the change/webclient_error_handling branch March 21, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants