package jsonerror

import "github.com/googleapis/gax-go/v2/apierror/internal/proto"

Index

Variables

var File_error_proto protoreflect.FileDescriptor

Types

type Error

type Error struct {

	// The actual error payload. The nested message structure is for backward
	// compatibility with Google API client libraries. It also makes the error
	// more readable to developers.
	Error *Error_Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

The error format v2 for Google JSON REST APIs. Copied from https://cloud.google.com/apis/design/errors#http_mapping.

NOTE: This schema is not used for other wire protocols.

func (*Error) Descriptor

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetError

func (x *Error) GetError() *Error_Status

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Error_Status

type Error_Status struct {

	// The HTTP status code that corresponds to `google.rpc.Status.code`.
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// This corresponds to `google.rpc.Status.message`.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// This is the enum version for `google.rpc.Status.code`.
	Status code.Code `protobuf:"varint,4,opt,name=status,proto3,enum=google.rpc.Code" json:"status,omitempty"`
	// This corresponds to `google.rpc.Status.details`.
	Details []*anypb.Any `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

This message has the same semantics as `google.rpc.Status`. It uses HTTP status code instead of gRPC status code. It has an extra field `status` for backward compatibility with Google API Client Libraries.

func (*Error_Status) Descriptor

func (*Error_Status) Descriptor() ([]byte, []int)

Deprecated: Use Error_Status.ProtoReflect.Descriptor instead.

func (*Error_Status) GetCode

func (x *Error_Status) GetCode() int32

func (*Error_Status) GetDetails

func (x *Error_Status) GetDetails() []*anypb.Any

func (*Error_Status) GetMessage

func (x *Error_Status) GetMessage() string

func (*Error_Status) GetStatus

func (x *Error_Status) GetStatus() code.Code

func (*Error_Status) ProtoMessage

func (*Error_Status) ProtoMessage()

func (*Error_Status) ProtoReflect

func (x *Error_Status) ProtoReflect() protoreflect.Message

func (*Error_Status) Reset

func (x *Error_Status) Reset()

func (*Error_Status) String

func (x *Error_Status) String() string

Source Files

error.pb.go

Version
v2.2.0
Published
Mar 16, 2022
Platform
js/wasm
Imports
6 packages
Last checked
12 hours ago

Tools for package owners.