modified internal/server/annotations_handler.go +2 -0
| @@ -161,6 +161,8 @@ func (s *Server) handleDeleteAnnotation(w http.ResponseWriter, r *http.Request) |
| 161 | 161 | if ok { |
| 162 | 162 | if delErr := client.DeleteRecord(ctx, user.DID, parsed.Collection, parsed.RKey); delErr != nil { |
| 163 | 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 | } |
| @@ -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 |
| 251 | 251 | if ok { |
| 252 | 252 | if delErr := client.DeleteRecord(r.Context(), user.DID, parsed.Collection, parsed.RKey); delErr != nil { |
| 253 | 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 | } |
| @@ -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 | } |