errors

package
v0.0.0-...-cca6f89 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 2 Imported by: 6

Documentation

Overview

Copyright (c) 2022 Skyflow, Inc.

Copyright (c) 2022 Skyflow, Inc.

Index

Constants

View Source
const (
	// Server - Represents server side error
	Server ErrorCodesEnum = "Server"
	// InvalidInput - Input passed was not invalid format
	InvalidInput = "InvalidInput"
	SdkErrorCode = "400"
)

Defining the values of Error code Enum

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCodesEnum

type ErrorCodesEnum string

ErrorCodesEnum - Enum defines the list of error codes/categorization of errors in Skyflow.

type SkyflowError

type SkyflowError struct {
	// contains filtered or unexported fields
}

SkyflowError - The Error Object for Skyflow APIs. Contains : 1. code - Represents the type of error 2. message - The message contained in the error 3. originalError - The original error (if any) which resulted in this error

func NewSkyflowError

func NewSkyflowError(code ErrorCodesEnum, message string) *SkyflowError

NewSkyflowError - Creates a new Skyflow Error Object with given message

func NewSkyflowErrorWrap

func NewSkyflowErrorWrap(code ErrorCodesEnum, err error, message string) *SkyflowError

NewSkyflowErrorWrap - Creates a new Skyflow Error Object using the given error

func NewSkyflowErrorf

func NewSkyflowErrorf(code ErrorCodesEnum, format string, a ...interface{}) *SkyflowError

NewSkyflowErrorf - Creates a new Skyflow Error Object with Parameter Substitution

func (*SkyflowError) Error

func (se *SkyflowError) Error() string

Error - Uses the Underlying go's error for providing Error() interface impl.

func (*SkyflowError) GetCode

func (se *SkyflowError) GetCode() string

func (*SkyflowError) GetMessage

func (se *SkyflowError) GetMessage() string

func (*SkyflowError) GetOriginalError

func (se *SkyflowError) GetOriginalError() error

GetOriginalError - Returns the underlying error (if any)

Jump to

Keyboard shortcuts

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