Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
Show link(s) to error code(s)' description on Microsoft's site
Browse files Browse the repository at this point in the history
This makes the life easier when debugging.
  • Loading branch information
peat-psuwit committed Apr 25, 2023
1 parent 337c745 commit 25a148c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/aad/aad.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ func (auth AAD) Authenticate(ctx context.Context, cfg config.AAD, username, pass
}
}
logger.Err(ctx, "Unknown error code(s) from server: %v", addErrWithCodes.ErrorCodes)

logger.Debug(ctx, "For more information about the error code(s), see:")
for _, errcode := range addErrWithCodes.ErrorCodes {
logger.Debug(ctx, "Error code %d: https://login.microsoftonline.com/error?code=%d", errcode, errcode)
}

return ErrDeny
}

Expand Down

0 comments on commit 25a148c

Please sign in to comment.