mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 09:13:15 +03:00
[PR #425] [MERGED] fix: improve LDAP error handling #805
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/425
Author: @ItalyPaleAle
Created: 4/10/2025
Status: ✅ Merged
Merged: 4/13/2025
Merged by: @kmendell
Base:
main← Head:ldap-error-handling📝 Commits (4)
25ceb01Improve error handling for LDAP511391cFixed: detect group4d9768fMerge branch 'main' into ldap-error-handlingc5b9917Merge branch 'main' into ldap-error-handling📊 Changes
6 files changed (+239 additions, -103 deletions)
View changed files
📝
backend/internal/common/errors.go(+7 -0)📝
backend/internal/controller/user_group_controller.go(+1 -1)📝
backend/internal/service/ldap_service.go(+124 -82)➕
backend/internal/service/ldap_service_test.go(+73 -0)📝
backend/internal/service/user_group_service.go(+7 -8)📝
backend/internal/service/user_service.go(+27 -12)📄 Description
This PR revises how errors are handled in the LDAP syncing service. I went through line-by-line to make sure that we treat errors consistently, and in most cases we should abort the sync and roll-back the changes in the DB (with some exceptions).
Should hopefully fix errors that were happening with syncing from LDAP, as some errors were simply logged while others causes failures.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.