github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/pkg/api/handlers/compat/unsupported.go (about)

     1  package compat
     2  
     3  import (
     4  	"fmt"
     5  	"net/http"
     6  
     7  	"github.com/containers/libpod/pkg/api/handlers/utils"
     8  	log "github.com/sirupsen/logrus"
     9  )
    10  
    11  func UnsupportedHandler(w http.ResponseWriter, r *http.Request) {
    12  	msg := fmt.Sprintf("Path %s is not supported", r.URL.Path)
    13  	log.Infof("Request Failed: %s", msg)
    14  
    15  	utils.WriteJSON(w, http.StatusInternalServerError,
    16  		utils.ErrorModel{Message: msg})
    17  }