From 0248a6211aaf1b2324dc5bb82a4cd70228e1c3b9 Mon Sep 17 00:00:00 2001 From: joel Date: Tue, 27 Feb 2024 14:23:54 +0800 Subject: [PATCH] fix: handle error --- internal/api/token.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/api/token.go b/internal/api/token.go index 5be1616b4..d4e466009 100644 --- a/internal/api/token.go +++ b/internal/api/token.go @@ -436,7 +436,9 @@ func (a *API) updateMFASessionAndClaims(r *http.Request, tx *storage.Connection, if terr := models.AddClaimToSession(tx, session.ID, authenticationMethod); terr != nil { return terr } - tx.Load(session, "AMRClaims") + if terr := tx.Load(session, "AMRClaims"); terr != nil { + return terr + } token, err := session.FindCurrentlyActiveRefreshToken(tx) if err != nil {