Documentation
¶
Index ¶
- type APIError
- type BadGatewayResponseError
- type BadRequestResponseError
- type ConflictResponseError
- type EdgeNetworkTimeoutResponseError
- type ForbiddenResponseError
- type InternalServerResponseError
- type NotFoundResponseError
- type OAuthErrorResponse
- type PayloadTooLargeResponseError
- type PaymentRequiredResponseError
- type ProviderOverloadedResponseError
- type RequestTimeoutResponseError
- type ServiceUnavailableResponseError
- type TooManyRequestsResponseError
- type UnauthorizedResponseError
- type UnprocessableEntityResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
func NewAPIError ¶
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 ¶
func (e *EdgeNetworkTimeoutResponseError) Error() string
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 ¶
func (e *InternalServerResponseError) Error() string
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 OAuthErrorResponse ¶ added in v0.7.112
type OAuthErrorResponse struct {
Error_ components.ErrorEnum `json:"error"`
ErrorDescription string `json:"error_description"`
}
OAuthErrorResponse - RFC 6749 §5.2 error response.
func (*OAuthErrorResponse) Error ¶ added in v0.7.112
func (e *OAuthErrorResponse) 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 ¶
func (e *PayloadTooLargeResponseError) Error() string
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 ¶
func (e *PaymentRequiredResponseError) Error() string
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 ¶
func (e *ProviderOverloadedResponseError) Error() string
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 ¶
func (e *RequestTimeoutResponseError) Error() string
type ServiceUnavailableResponseError ¶
type ServiceUnavailableResponseError struct {
// Error data for ServiceUnavailableResponse
}
ServiceUnavailableResponseError - Service Unavailable - Service temporarily unavailable
func (*ServiceUnavailableResponseError) Error ¶
func (e *ServiceUnavailableResponseError) Error() string
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 ¶
func (e *TooManyRequestsResponseError) Error() string
type UnauthorizedResponseError ¶
type UnauthorizedResponseError struct {
// Error data for UnauthorizedResponse
}
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 ¶
func (e *UnprocessableEntityResponseError) Error() string
Source Files
¶
- apierror.go
- badgatewayresponseerror.go
- badrequestresponseerror.go
- conflictresponseerror.go
- edgenetworktimeoutresponseerror.go
- forbiddenresponseerror.go
- internalserverresponseerror.go
- notfoundresponseerror.go
- oautherrorresponse.go
- payloadtoolargeresponseerror.go
- paymentrequiredresponseerror.go
- provideroverloadedresponseerror.go
- requesttimeoutresponseerror.go
- serviceunavailableresponseerror.go
- toomanyrequestsresponseerror.go
- unauthorizedresponseerror.go
- unprocessableentityresponseerror.go