Files
podman/pkg/api/handlers/compat/unsupported.go
Jhon Honce 31112e4b08 Refactor handler packages
To help with packaging, the handlers in pkg/api/handlers are now found
in pkg/api/handler/compat.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-03-10 08:03:41 -07:00

18 lines
390 B
Go

package compat
import (
"fmt"
"net/http"
"github.com/containers/libpod/pkg/api/handlers/utils"
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.StatusInternalServerError,
utils.ErrorModel{Message: msg})
}