grpcerr

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package grpcerr provides the ability to extract the status code from gRPC errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorCode

func ErrorCode(err error) codes.Code

ErrorCode returns the gRPC code associated with the given error if it implements the gRPC Error interface.

func ErrorCoder

func ErrorCoder() errcode.ErrorCoder

ErrorCoder return the gRPC ErrorCoder.

Types

type Error

type Error interface {
	GRPCStatus() *status.Status
	error
}

An Error is an error with an explicit gRPC status.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL