errors

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequestStatus added in v0.4.0

func BadRequestStatus(format string, args ...any) error

BadRequestStatus returns a status error with an invalid argument code

func CheckSimilarPermission added in v0.4.0

func CheckSimilarPermission(assert *assert.Assertions, expected, actual *pb.Permission, substituteNilWithDefaultOk bool)

func InvalidArgumentError

func InvalidArgumentError(msg string, f map[string]string) error

InvalidArgumentError returns an grpc invalid argument status error.

func ParseAWSError added in v0.4.0

func ParseAWSError(op string, err error) (st *status.Status, permission *pb.Permission)

ParseAWSError converts an aws service error into a RPC status. This method will handle parsing the following aws error codes: throttling, connections, and credentials. This method will fallback to parsing the http status code when it cannot match an aws error code. This method does not handle specific service type errors such as S3 or EC2.

func TestAwsError added in v0.4.0

func TestAwsError(code, msg string) error

TestAwsError returns an generic api error

func TestAwsHttpResponseError added in v0.4.0

func TestAwsHttpResponseError(code int, msg string) error

TestAwsHttpResponseError returns an aws http response error

func UnknownStatus added in v0.4.0

func UnknownStatus(format string, args ...any) error

UnknownStatus returns a status error with an internal error code

Types

This section is empty.

Jump to

Keyboard shortcuts

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