connecthelper

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package connecthelper provides helper functions for connectRPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeOf added in v0.4.27

func CodeOf(err error) string

CodeOf returns the string representation of the given error.

func SDKTypeAndVersion

func SDKTypeAndVersion(header http.Header) (string, string)

SDKTypeAndVersion returns the type and version of the SDK from the given metadata.

func ToRPCCodeString

func ToRPCCodeString(err error) string

ToRPCCodeString returns a string representation of the given error.

func ToStatusError

func ToStatusError(err error) error

ToStatusError returns connect.Error from the given logic error. If an error occurs while executing logic in API handler, connectRPC connect.error should be returned so that the client can know more about the status of the request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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