package httptypes

import "go.etcd.io/etcd/server/v3/etcdserver/api/etcdhttp/types"

Index

Types

type HTTPError

type HTTPError struct {
	Message string `json:"message"`
	// Code is the HTTP status code
	Code int `json:"-"`
}

func NewHTTPError

func NewHTTPError(code int, m string) *HTTPError

func (HTTPError) Error

func (e HTTPError) Error() string

func (HTTPError) WriteTo

func (e HTTPError) WriteTo(w http.ResponseWriter) error

Source Files

errors.go

Version
v3.6.0 (latest)
Published
May 15, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
5 hours ago

Tools for package owners.