sdkerrors

package
v0.5.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message     string
	StatusCode  int
	Body        string
	RawResponse *http.Response
}

func NewAPIError

func NewAPIError(message string, statusCode int, body string, httpRes *http.Response) *APIError

func (*APIError) Error

func (e *APIError) Error() string

type BadGatewayResponseError

type BadGatewayResponseError struct {
	// Error data for BadGatewayResponse
	Error_             components.BadGatewayResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                         `json:"openrouter_metadata,omitzero"`
	UserID             *string                                `json:"user_id,omitzero"`
}

BadGatewayResponseError - Bad Gateway - Provider/upstream API failure

func (*BadGatewayResponseError) Error

func (e *BadGatewayResponseError) Error() string

type BadRequestResponseError

type BadRequestResponseError struct {
	// Error data for BadRequestResponse
	Error_             components.BadRequestResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                         `json:"openrouter_metadata,omitzero"`
	UserID             *string                                `json:"user_id,omitzero"`
}

BadRequestResponseError - Bad Request - Invalid request parameters or malformed input

func (*BadRequestResponseError) Error

func (e *BadRequestResponseError) Error() string

type ConflictResponseError

type ConflictResponseError struct {
	// Error data for ConflictResponse
	Error_             components.ConflictResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                       `json:"openrouter_metadata,omitzero"`
	UserID             *string                              `json:"user_id,omitzero"`
}

ConflictResponseError - Conflict - Resource conflict or concurrent modification

func (*ConflictResponseError) Error

func (e *ConflictResponseError) Error() string

type EdgeNetworkTimeoutResponseError

type EdgeNetworkTimeoutResponseError struct {
	// Error data for EdgeNetworkTimeoutResponse
	Error_             components.EdgeNetworkTimeoutResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                                 `json:"openrouter_metadata,omitzero"`
	UserID             *string                                        `json:"user_id,omitzero"`
}

EdgeNetworkTimeoutResponseError - Infrastructure Timeout - Provider request timed out at edge network

func (*EdgeNetworkTimeoutResponseError) Error

type ForbiddenResponseError

type ForbiddenResponseError struct {
	// Error data for ForbiddenResponse
	Error_             components.ForbiddenResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                        `json:"openrouter_metadata,omitzero"`
	UserID             *string                               `json:"user_id,omitzero"`
}

ForbiddenResponseError - Forbidden - Authentication successful but insufficient permissions

func (*ForbiddenResponseError) Error

func (e *ForbiddenResponseError) Error() string

type InternalServerResponseError

type InternalServerResponseError struct {
	// Error data for InternalServerResponse
	Error_             components.InternalServerResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                             `json:"openrouter_metadata,omitzero"`
	UserID             *string                                    `json:"user_id,omitzero"`
}

InternalServerResponseError - Internal Server Error - Unexpected server error

func (*InternalServerResponseError) Error

type NotFoundResponseError

type NotFoundResponseError struct {
	// Error data for NotFoundResponse
	Error_             components.NotFoundResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                       `json:"openrouter_metadata,omitzero"`
	UserID             *string                              `json:"user_id,omitzero"`
}

NotFoundResponseError - Not Found - Resource does not exist

func (*NotFoundResponseError) Error

func (e *NotFoundResponseError) Error() string

type PayloadTooLargeResponseError

type PayloadTooLargeResponseError struct {
	// Error data for PayloadTooLargeResponse
	Error_             components.PayloadTooLargeResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                              `json:"openrouter_metadata,omitzero"`
	UserID             *string                                     `json:"user_id,omitzero"`
}

PayloadTooLargeResponseError - Payload Too Large - Request payload exceeds size limits

func (*PayloadTooLargeResponseError) Error

type PaymentRequiredResponseError

type PaymentRequiredResponseError struct {
	// Error data for PaymentRequiredResponse
	Error_             components.PaymentRequiredResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                              `json:"openrouter_metadata,omitzero"`
	UserID             *string                                     `json:"user_id,omitzero"`
}

PaymentRequiredResponseError - Payment Required - Insufficient credits or quota to complete request

func (*PaymentRequiredResponseError) Error

type ProviderOverloadedResponseError

type ProviderOverloadedResponseError struct {
	// Error data for ProviderOverloadedResponse
	Error_             components.ProviderOverloadedResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                                 `json:"openrouter_metadata,omitzero"`
	UserID             *string                                        `json:"user_id,omitzero"`
}

ProviderOverloadedResponseError - Provider Overloaded - Provider is temporarily overloaded

func (*ProviderOverloadedResponseError) Error

type RequestTimeoutResponseError

type RequestTimeoutResponseError struct {
	// Error data for RequestTimeoutResponse
	Error_             components.RequestTimeoutResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                             `json:"openrouter_metadata,omitzero"`
	UserID             *string                                    `json:"user_id,omitzero"`
}

RequestTimeoutResponseError - Request Timeout - Operation exceeded time limit

func (*RequestTimeoutResponseError) Error

type ServiceUnavailableResponseError

type ServiceUnavailableResponseError struct {
	// Error data for ServiceUnavailableResponse
	Error_             components.ServiceUnavailableResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                                 `json:"openrouter_metadata,omitzero"`
	UserID             *string                                        `json:"user_id,omitzero"`
}

ServiceUnavailableResponseError - Service Unavailable - Service temporarily unavailable

func (*ServiceUnavailableResponseError) Error

type TooManyRequestsResponseError

type TooManyRequestsResponseError struct {
	// Error data for TooManyRequestsResponse
	Error_             components.TooManyRequestsResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                              `json:"openrouter_metadata,omitzero"`
	UserID             *string                                     `json:"user_id,omitzero"`
}

TooManyRequestsResponseError - Too Many Requests - Rate limit exceeded

func (*TooManyRequestsResponseError) Error

type UnauthorizedResponseError

type UnauthorizedResponseError struct {
	// Error data for UnauthorizedResponse
	Error_             components.UnauthorizedResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                           `json:"openrouter_metadata,omitzero"`
	UserID             *string                                  `json:"user_id,omitzero"`
}

UnauthorizedResponseError - Unauthorized - Authentication required or invalid credentials

func (*UnauthorizedResponseError) Error

func (e *UnauthorizedResponseError) Error() string

type UnprocessableEntityResponseError

type UnprocessableEntityResponseError struct {
	// Error data for UnprocessableEntityResponse
	Error_             components.UnprocessableEntityResponseErrorData `json:"error"`
	OpenrouterMetadata map[string]any                                  `json:"openrouter_metadata,omitzero"`
	UserID             *string                                         `json:"user_id,omitzero"`
}

UnprocessableEntityResponseError - Unprocessable Entity - Semantic validation failure

func (*UnprocessableEntityResponseError) Error

Jump to

Keyboard shortcuts

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