···114114 uri, cid, err := client.CreateRecord(ctx, user.DID, atproto.CollectionAnnotation, record)
115115 if err != nil {
116116 s.logger.Error("failed to write annotation to PDS", "error", err)
117117- http.Error(w, "failed to write annotation to PDS: "+err.Error(), http.StatusBadGateway)
117117+ http.Error(w, "failed to write annotation to PDS: "+err.Error(), http.StatusInternalServerError)
118118 return
119119 }
120120 a.URI = uri
···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)
164164- http.Error(w, "failed to delete annotation from PDS: "+delErr.Error(), http.StatusBadGateway)
164164+ http.Error(w, "failed to delete annotation from PDS: "+delErr.Error(), http.StatusInternalServerError)
165165 return
166166 }
167167 }
+2-2
internal/server/articles_handler.go
···286286 if ok {
287287 if delErr := client.DeleteRecord(ctx, user.DID, parsed.Collection, parsed.RKey); delErr != nil {
288288 s.logger.Error("failed to delete like from PDS", "error", delErr)
289289- http.Error(w, "failed to delete like from PDS: "+delErr.Error(), http.StatusBadGateway)
289289+ http.Error(w, "failed to delete like from PDS: "+delErr.Error(), http.StatusInternalServerError)
290290 return
291291 }
292292 }
···307307 uri, _, err := client.CreateRecord(ctx, user.DID, atproto.CollectionLike, likeRecord)
308308 if err != nil {
309309 s.logger.Error("failed to write like to PDS", "error", err)
310310- http.Error(w, "failed to write like to PDS: "+err.Error(), http.StatusBadGateway)
310310+ http.Error(w, "failed to write like to PDS: "+err.Error(), http.StatusInternalServerError)
311311 return
312312 }
313313
+2-2
internal/server/auth_handler.go
···50505151 did, resolveErr := atproto.ResolveHandle(r.Context(), handle)
5252 if resolveErr != nil {
5353- s.renderError(w, r, http.StatusBadGateway, "Handle not found", "Could not resolve that handle. Please check and try again.")
5353+ s.renderError(w, r, http.StatusBadRequest, "Handle not found", "Could not resolve that handle. Please check and try again.")
5454 return
5555 }
5656 user, createErr := s.dbs.Users.CreateUser(r.Context(), did)
···8383 did, err := atproto.ResolveHandle(r.Context(), handle)
8484 if err != nil {
8585 s.logger.Error("failed to resolve handle", "error", err)
8686- s.renderError(w, r, http.StatusBadGateway, "Handle not found", "Could not resolve that handle. Please check and try again.")
8686+ s.renderError(w, r, http.StatusBadRequest, "Handle not found", "Could not resolve that handle. Please check and try again.")
8787 return
8888 }
8989
+3-3
internal/server/feeds_handler.go
···164164 uri, cid, err := client.CreateRecord(r.Context(), user.DID, atproto.CollectionSubscription, record)
165165 if err != nil {
166166 s.logger.Error("failed to write subscription to PDS", "error", err)
167167- http.Error(w, "failed to write subscription to PDS: "+err.Error(), http.StatusBadGateway)
167167+ http.Error(w, "failed to write subscription to PDS: "+err.Error(), http.StatusInternalServerError)
168168 return
169169 }
170170 subURI = uri
···221221 if ok {
222222 if delErr := client.DeleteRecord(r.Context(), user.DID, parsed.Collection, parsed.RKey); delErr != nil {
223223 s.logger.Error("failed to delete subscription from PDS", "error", delErr)
224224- http.Error(w, "failed to delete subscription from PDS: "+delErr.Error(), http.StatusBadGateway)
224224+ http.Error(w, "failed to delete subscription from PDS: "+delErr.Error(), http.StatusInternalServerError)
225225 return
226226 }
227227 }
···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)
254254- http.Error(w, "failed to delete subscription from PDS: "+delErr.Error(), http.StatusBadGateway)
254254+ http.Error(w, "failed to delete subscription from PDS: "+delErr.Error(), http.StatusInternalServerError)
255255 return
256256 }
257257 }