Skip to content
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

Flytt over relevant kode fra familie-felles http #1650

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Conversation

sillerud
Copy link
Contributor

No description provided.

@sillerud sillerud requested a review from a team as a code owner February 25, 2025 09:31
uri: URI,
): T {
if (!respons.statusCode.is2xxSuccessful) {
secureLogger.info("Kall mot $uri feilet: ${respons.body}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
secureLogger.info("Kall mot $uri feilet: ${respons.body}")
secureLogger.info("Kall mot {} feilet: {}", uri, respons.body)

): T {
if (!respons.statusCode.is2xxSuccessful) {
secureLogger.info("Kall mot $uri feilet: ${respons.body}")
log.info("Kall mot $uri feilet: ${respons.statusCode}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Samme her

Copy link
Contributor

Choose a reason for hiding this comment

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

Bare sjekk hele siden

return try {
val preferredUsername =
SpringTokenValidationContextHolder().getTokenValidationContext().getClaims("azuread").get("preferred_username")
return preferredUsername == null
Copy link
Contributor

Choose a reason for hiding this comment

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

       `preferredUsername.isNull()` eller lignende?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tenker == null er like greit, men har heller ikke tenkt å gjøre så mye endringer her siden dette er copy pasta. Vil uansett kvitte meg med hele dritten 🤠

): List<Journalpost> {
SecureLog.medContext(logContext) {
info(
"henter journalposter for bruker med ident ${journalposterForBrukerRequest.brukerId} " +
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴

@@ -54,7 +53,9 @@ class PdlClient(
logger.medContext(logContext) {
warn("Advarsel ved henting av personinfo fra PDL. Se securelogs for detaljer.")
}
secureLogger.warn("Advarsel ved henting av personinfo fra PDL: ${respons.extensions?.warnings}")
SecureLog.medContext(logContext) {
warn("Advarsel ved henting av personinfo fra PDL: ${respons.extensions?.warnings}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Denne filen også

@sillerud sillerud force-pushed the http-client branch 2 times, most recently from 2a69b3a to fe7057f Compare February 25, 2025 09:58
amiraliw
amiraliw previously approved these changes Feb 25, 2025
fredrikmork
fredrikmork previously approved these changes Feb 25, 2025
amiraliw
amiraliw previously approved these changes Feb 25, 2025
@sillerud sillerud merged commit 930fd59 into main Feb 25, 2025
4 checks passed
@sillerud sillerud deleted the http-client branch February 25, 2025 11:37
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.

3 participants