diff options
Diffstat (limited to 'internal/api/handlers_podcast.go')
| -rw-r--r-- | internal/api/handlers_podcast.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/api/handlers_podcast.go b/internal/api/handlers_podcast.go index 4568022..f93b15c 100644 --- a/internal/api/handlers_podcast.go +++ b/internal/api/handlers_podcast.go @@ -58,6 +58,10 @@ func (s *Server) handleSubscribePodcast(w http.ResponseWriter, r *http.Request) forbidden(w, "access denied") return } + if errors.Is(err, service.ErrInvalidFeed) { + badRequest(w, "invalid feed") + return + } s.logger.Error("subscribe podcast", "err", err) writeJSON(w, http.StatusInternalServerError, map[string]string{"error": "failed to subscribe"}) return |
