errutil

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context added in v0.3.0

func Context(ctx context.Context, msg string) error

Context extracts the timeout or cancellation error from a context.

func FromUserProp

func FromUserProp(user map[string]string) error

func IsNoReturn

func IsNoReturn(err error) (bool, error)

Get whether this error is returnable, and the underlying error.

func Mqtt added in v0.3.0

func Mqtt(ctx context.Context, msg string, ack *mqtt.Ack, err error) error

Translate a github.com/Azure/iot-operations-sdks/go/internal/mqtt ack/err return to an SDK error. An actual error indicates a failure in the client library, whereas a response with a failure code indicates an issue in the MQTT request.

func NewUUID

func NewUUID() (string, error)

Generate UUID with protocol error.

func NoReturn

func NoReturn(err error) error

Indicate that this error cannot be returned over RPC.

func Normalize added in v0.3.0

func Normalize(err error, msg string) error

Normalize well-known errors into protocol errors.

func Return

func Return(err error, logger log.Logger, shallow bool) error

Prepare the error for returning, removing any no-return flags (since this is used outside of the RPC context) and applying the shallow flag if possible.

func ToUserProp

func ToUserProp(err error) map[string]string

func ValidateNonNil

func ValidateNonNil(args map[string]any) error

Validate that a collection of arguments are not nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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