aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/unsupported.go
blob: 1c518690ffc47a74974b0eb9d0300f7aefe9351b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package compat

import (
	"fmt"
	"net/http"

	"github.com/containers/podman/v2/pkg/api/handlers/utils"
	"github.com/containers/podman/v2/pkg/errorhandling"
	log "github.com/sirupsen/logrus"
)

func UnsupportedHandler(w http.ResponseWriter, r *http.Request) {
	msg := fmt.Sprintf("Path %s is not supported", r.URL.Path)
	log.Infof("Request Failed: %s", msg)

	utils.WriteJSON(w, http.StatusNotFound, errorhandling.ErrorModel{Message: msg})
}