Documentation ¶
Overview ¶
Package pfg provides error helpers for detailed return errors to be used with https://github.com/grpc-ecosystem/grpc-gateway
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorDetail ¶
ErrorDetail creates an error with bundled detail messages
func ErrorHandler ¶
func ErrorHandler(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, rw http.ResponseWriter, req *http.Request, err error)
ErrorHandler for gRPC JSON Gateway runtime
Usage
gw := runtime.NewServeMux( runtime.WithProtoErrorHandler(pfg.ErrorHandler), runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONBuiltin{}), )
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.