Skip to content

Commit

Permalink
apigw: clarify logout start error logging
Browse files Browse the repository at this point in the history
- No SAML error will ever be present when starting the logout flow from the SP (eVaka itself) -> don't waste time attempting to parse SAML errors and clarify the error description
  • Loading branch information
mikkopiu committed May 6, 2021
1 parent bcece40 commit 21763e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions apigw/src/shared/routes/auth/saml/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,10 @@ function createLogoutHandler({
await logoutExpress(req, res, sessionType)
return res.redirect(redirectUrl)
} catch (err) {
const description =
parseDescriptionFromSamlError(err, req) ||
'Could not parse SAML error.'
logAuditEvent(
`evaka.saml.${strategyName}.sign_out_failed`,
req,
`Log out failed. Description: ${description}. Error: ${err}.`
`Log out failed. Description: Failed before redirecting user to IdP. Error: ${err}.`
)
throw err
}
Expand Down

0 comments on commit 21763e8

Please sign in to comment.