internal/frontend: exit frontend fetch early on queue error
If enqueuing a frontend fetch task fails, log an error and return.
Trust: Jonathan Amsterdam
Run-TryBot: Jonathan Amsterdam
TryBot-Result: kokoro
@@ -201,6 +201,9 @@ func (s *Server) checkPossibleModulePaths(ctx context.Context, db *postgres.DB,
if _, err := s.queue.ScheduleFetch(ctx, modulePath, requestedVersion, opts); err != nil {
fr.err = err
fr.status = http.StatusInternalServerError
+ log.Errorf(ctx, "enqueuing %s@%s to frontend-fetch task queue: %v", modulePath, requestedVersion, err)
+ results[i] = fr
+ return
}
log.Debugf(ctx, "queued %s@%s to frontend-fetch task queue", modulePath, requestedVersion)
