exception

package
v0.0.0-...-e06565c Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginDaemonInternalServerError   = "PluginDaemonInternalServerError"
	PluginDaemonBadRequestError       = "PluginDaemonBadRequestError"
	PluginDaemonNotFoundError         = "PluginDaemonNotFoundError"
	PluginDaemonUnauthorizedError     = "PluginDaemonUnauthorizedError"
	PluginDaemonPermissionDeniedError = "PluginDaemonPermissionDeniedError"
	PluginDaemonInvokeError           = "PluginDaemonInvokeError"
	PluginUniqueIdentifierError       = "PluginUniqueIdentifierError"
	PluginNotFoundError               = "PluginNotFoundError"
	PluginUnauthorizedError           = "PluginUnauthorizedError"
	PluginPermissionDeniedError       = "PluginPermissionDeniedError"
	PluginInvokeError                 = "PluginInvokeError"
	PluginConnectionClosedError       = "ConnectionClosedError"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginDaemonError

type PluginDaemonError interface {
	error

	ToResponse() *entities.Response
}

func BadRequestError

func BadRequestError(err error) PluginDaemonError

func ConnectionClosedError

func ConnectionClosedError() PluginDaemonError

ConnectionClosedError is designed to be used when the connection was closed unexpectedly but the session is not closed yet.

func ErrPluginNotFound

func ErrPluginNotFound() PluginDaemonError

the difference between NotFoundError and ErrPluginNotFound is that the latter is used to notify the caller that the plugin is not installed, while the former is a generic NotFound error.

func Error

func Error(msg string) PluginDaemonError

func ErrorWithCode

func ErrorWithCode(msg string, code int) PluginDaemonError

func ErrorWithType

func ErrorWithType(msg string, errorType string) PluginDaemonError

func ErrorWithTypeAndArgs

func ErrorWithTypeAndArgs(msg string, errorType string, args map[string]any) PluginDaemonError

func ErrorWithTypeAndCode

func ErrorWithTypeAndCode(msg string, errorType string, code int) PluginDaemonError

func InternalServerError

func InternalServerError(err error) PluginDaemonError

func InvokePluginError

func InvokePluginError(err error) PluginDaemonError

func NotFoundError

func NotFoundError(err error) PluginDaemonError

func PermissionDeniedError

func PermissionDeniedError(msg string) PluginDaemonError

func UnauthorizedError

func UnauthorizedError() PluginDaemonError

func UniqueIdentifierError

func UniqueIdentifierError(err error) PluginDaemonError

Jump to

Keyboard shortcuts

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