mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00: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)
|
|
}
|