コンテンツにスキップ
View as Markdown

このコンテンツはまだ日本語訳がありません。

errors

import "github.com/daytonaio/daytona/libs/sdk-go/pkg/errors"

Index

func ConvertAPIError

func ConvertAPIError(err error, httpResp *http.Response) error

ConvertAPIError converts api-client-go errors to SDK error types

func ConvertToolboxError

func ConvertToolboxError(err error, httpResp *http.Response) error

ConvertToolboxError converts toolbox-api-client-go errors to SDK error types

type DaytonaError

DaytonaError is the base error type for all Daytona SDK errors

type DaytonaError struct {
Message string
StatusCode int
Headers http.Header
}

func NewDaytonaError

func NewDaytonaError(message string, statusCode int, headers http.Header) *DaytonaError

NewDaytonaError creates a new DaytonaError

func (*DaytonaError) Error

func (e *DaytonaError) Error() string

type DaytonaNotFoundError

DaytonaNotFoundError represents a resource not found error (404)

type DaytonaNotFoundError struct {
*DaytonaError
}

func NewDaytonaNotFoundError

func NewDaytonaNotFoundError(message string, headers http.Header) *DaytonaNotFoundError

NewDaytonaNotFoundError creates a new DaytonaNotFoundError

func (*DaytonaNotFoundError) Error

func (e *DaytonaNotFoundError) Error() string

type DaytonaRateLimitError

DaytonaRateLimitError represents a rate limit error (429)

type DaytonaRateLimitError struct {
*DaytonaError
}

func NewDaytonaRateLimitError

func NewDaytonaRateLimitError(message string, headers http.Header) *DaytonaRateLimitError

NewDaytonaRateLimitError creates a new DaytonaRateLimitError

func (*DaytonaRateLimitError) Error

func (e *DaytonaRateLimitError) Error() string

type DaytonaTimeoutError

DaytonaTimeoutError represents a timeout error

type DaytonaTimeoutError struct {
*DaytonaError
}

func NewDaytonaTimeoutError

func NewDaytonaTimeoutError(message string) *DaytonaTimeoutError

NewDaytonaTimeoutError creates a new DaytonaTimeoutError

func (*DaytonaTimeoutError) Error

func (e *DaytonaTimeoutError) Error() string