nandi/gleanpublic⑂ Fork 0
⑂ 2140c8a
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Return HTTP 502 on PDS deletion failureUnverified

Julien Robert committed 2026-04-28T14:20:19+02:00 Browse files
2140c8a parent: 02fcf1e
modified internal/server/annotations_handler.go +2 -0
@@ -161,6 +161,8 @@ func (s *Server) handleDeleteAnnotation(w http.ResponseWriter, r *http.Request)
161161 if ok {
162162 if delErr := client.DeleteRecord(ctx, user.DID, parsed.Collection, parsed.RKey); delErr != nil {
163163 s.logger.Error("failed to delete annotation from PDS", "error", delErr)
164+ http.Error(w, "failed to delete annotation from PDS: "+delErr.Error(), http.StatusBadGateway)
165+ return
164166 }
165167 }
166168 }
@@ -161,6 +161,8 @@ func (s *Server) handleDeleteAnnotation(w http.ResponseWriter, r *http.Request)
161 if ok {161 if ok {
162 if delErr := client.DeleteRecord(ctx, user.DID, parsed.Collection, parsed.RKey); delErr != nil {162 if delErr := client.DeleteRecord(ctx, user.DID, parsed.Collection, parsed.RKey); delErr != nil {
163 s.logger.Error("failed to delete annotation from PDS", "error", delErr)163 s.logger.Error("failed to delete annotation from PDS", "error", delErr)
164+ http.Error(w, "failed to delete annotation from PDS: "+delErr.Error(), http.StatusBadGateway)
165+ return
164 }166 }
165 }167 }
166 }168 }
modified internal/server/feeds_handler.go +2 -0
@@ -251,6 +251,8 @@ func (s *Server) handleClearAllSubscriptions(w http.ResponseWriter, r *http.Requ
251251 if ok {
252252 if delErr := client.DeleteRecord(r.Context(), user.DID, parsed.Collection, parsed.RKey); delErr != nil {
253253 s.logger.Error("failed to delete subscription from PDS", "error", delErr, "uri", sub.URI.String)
254+ http.Error(w, "failed to delete subscription from PDS: "+delErr.Error(), http.StatusBadGateway)
255+ return
254256 }
255257 }
256258 }
@@ -251,6 +251,8 @@ func (s *Server) handleClearAllSubscriptions(w http.ResponseWriter, r *http.Requ
251 if ok {251 if ok {
252 if delErr := client.DeleteRecord(r.Context(), user.DID, parsed.Collection, parsed.RKey); delErr != nil {252 if delErr := client.DeleteRecord(r.Context(), user.DID, parsed.Collection, parsed.RKey); delErr != nil {
253 s.logger.Error("failed to delete subscription from PDS", "error", delErr, "uri", sub.URI.String)253 s.logger.Error("failed to delete subscription from PDS", "error", delErr, "uri", sub.URI.String)
254+ http.Error(w, "failed to delete subscription from PDS: "+delErr.Error(), http.StatusBadGateway)
255+ return
254 }256 }
255 }257 }
256 }258 }