prysm-pulse/network/httputil/errors.go

14 lines
207 B
Go
Raw Normal View History

package httputil
import (
"net/http"
)
func HandleError(w http.ResponseWriter, message string, code int) {
errJson := &DefaultJsonError{
Message: message,
Code: code,
}
WriteError(w, errJson)
}