errors

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MPL-2.0 Imports: 17 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(msg string) error

BadRequestStatus returns a status error with an invalid argument code and the provided message.

func BadRequestStatusf added in v0.6.0

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

BadRequestStatusf returns a status error with an invalid argument code and a formatted error message.

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 TestAwsS3AccessDeniedError added in v0.6.0

func TestAwsS3AccessDeniedError(msg string) error

TestAwsS3AccessDeniedError returns an S3 AccessDenied error.

func TestAwsS3InvalidObjectStateError added in v0.6.0

func TestAwsS3InvalidObjectStateError(msg string) error

TestAwsS3InvalidObjectStateError returns an S3 InvalidObjectState error.

func TestAwsS3NoSuchBucketError added in v0.6.0

func TestAwsS3NoSuchBucketError(msg string) error

TestAwsS3NoSuchBucketError returns an S3 NoSuchBucket error.

func TestAwsS3NoSuchKeyError added in v0.6.0

func TestAwsS3NoSuchKeyError(msg string) error

TestAwsS3NoSuchKeyError returns an S3 NoSuchKey error.

func TestAwsS3NotFoundError added in v0.6.0

func TestAwsS3NotFoundError(msg string) error

TestAwsS3NotFoundError returns an S3 NotFound error.

func UnknownStatus added in v0.4.0

func UnknownStatus(msg string) error

UnknownStatus returns a status error with an internal error code and the provided message.

func UnknownStatusf added in v0.6.0

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

UnknownStatusf returns a status error with an internal error code and a formatted error message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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