prysm-pulse/network/http/errors.go
Radosław Kapka a9b003e1fe
HTTP Beacon API: /eth/v1/validator/contribution_and_proofs (#12660)
* HTTP Beacon API: `/eth/v1/validator/contribution_and_proofs`

* add comment to invalid test case

* fix validation and test

* review

---------

Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
2023-07-31 17:32:39 +00:00

14 lines
203 B
Go

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