prysm-pulse/network/httputil/errors.go
2023-12-15 03:26:48 +00:00

14 lines
207 B
Go

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