mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 07:58:22 -05:00
* remove validation package * structs cleanup * merge with apimiddleware removal * more validation and Bls capitalization * builder test fix * use strconv for uint->str conversions * use DecodeHexWithLength * use exact param names * rename http package to httputil * change conversions to fmt.Sprintf * handle query paramsd and route variables * spans and receiver name * split structs, move bytes helper * missing ok check * fix reference to indexed failure * errors fixup * add godoc to helper * fix BLS casing and chainhead ref * review * fix import in tests * gzl
14 lines
207 B
Go
14 lines
207 B
Go
package httputil
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func HandleError(w http.ResponseWriter, message string, code int) {
|
|
errJson := &DefaultErrorJson{
|
|
Message: message,
|
|
Code: code,
|
|
}
|
|
WriteError(w, errJson)
|
|
}
|