mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
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 := &DefaultJsonError{
|
|
Message: message,
|
|
Code: code,
|
|
}
|
|
WriteError(w, errJson)
|
|
}
|