apierrors

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT 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 AccessRequestPermissionDeniedResponseError added in v0.13.5

type AccessRequestPermissionDeniedResponseError struct {
	ErrorType         components.AccessRequestPermissionDeniedResponseErrorType `json:"errorType"`
	CreatedBy         components.Person                                         `json:"createdBy"`
	RequestableRoles  []components.UserRole                                     `json:"requestableRoles"`
	HasPendingRequest bool                                                      `json:"hasPendingRequest"`
	HTTPMeta          components.HTTPMetadata                                   `json:"-"`
}

func (*AccessRequestPermissionDeniedResponseError) Error added in v0.13.5

type CollectionError

type CollectionError struct {
	ErrorCode components.CollectionErrorErrorCode `json:"errorCode"`
	HTTPMeta  components.HTTPMetadata             `json:"-"`
}

func (*CollectionError) Error

func (e *CollectionError) Error() string

type ErrorInfoResponse added in v0.12.0

type ErrorInfoResponse struct {
	// Error message describing what went wrong
	Error_ string `json:"error"`
	// Additional details about the error
	Message  *string                 `json:"message,omitempty"`
	HTTPMeta components.HTTPMetadata `json:"-"`
}

ErrorInfoResponse - Error response for custom metadata operations

func (*ErrorInfoResponse) Error added in v0.12.0

func (e *ErrorInfoResponse) Error() string

type ErrorResponse added in v0.11.29

type ErrorResponse struct {
	// Client-facing error message describing what went wrong
	Message  *string                 `json:"message,omitempty"`
	HTTPMeta components.HTTPMetadata `json:"-"`
}

ErrorResponse - Error response returned for failed requests

func (*ErrorResponse) Error added in v0.11.29

func (e *ErrorResponse) Error() string

type GleanDataError

type GleanDataError struct {
	// Indicates the gmail results could not be fetched due to bad token.
	BadGmailToken *bool `json:"badGmailToken,omitempty"`
	// Indicates the outlook results could not be fetched due to bad token.
	BadOutlookToken *bool `json:"badOutlookToken,omitempty"`
	// Indicates results could not be fetched due to invalid operators in the query.
	InvalidOperators []components.InvalidOperatorValueError `json:"invalidOperators,omitempty"`
	ErrorMessages    []components.ErrorMessage              `json:"errorMessages,omitempty"`
	// Indicates the federated search results could not be fetched due to rate limiting.
	FederatedSearchRateLimitError *bool                   `json:"federatedSearchRateLimitError,omitempty"`
	HTTPMeta                      components.HTTPMetadata `json:"-"`
}

func (*GleanDataError) Error

func (e *GleanDataError) Error() string

type PlatformProblemDetailError added in v0.13.0

type PlatformProblemDetailError struct {
	// URI identifying the error type.
	Type string `json:"type"`
	// Short, human-readable summary of the error.
	Title string `json:"title"`
	// HTTP status code mirrored from the response.
	Status int64 `json:"status"`
	// Human-readable explanation specific to this occurrence.
	Detail string `json:"detail"`
	// Stable machine-readable error code.
	Code components.PlatformProblemDetailCode `json:"code"`
	// Direct URL to documentation for this error code.
	DocumentationURL *string `json:"documentation_url,omitempty"`
	// Platform-generated request ID for support correlation.
	RequestID string `json:"request_id"`
	// Field-level validation problems, one entry per offending field.
	Errors   []components.PlatformProblemDetailError `json:"errors,omitempty"`
	HTTPMeta components.HTTPMetadata                 `json:"-"`
}

PlatformProblemDetailError - Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation.

func (*PlatformProblemDetailError) Error added in v0.13.0

type PlatformUnauthorizedAgentToolsProblemError added in v0.13.5

type PlatformUnauthorizedAgentToolsProblemError struct {
	// URI identifying the error type.
	Type string `json:"type"`
	// Short, human-readable summary of the error.
	Title string `json:"title"`
	// HTTP status code mirrored from the response.
	Status int64 `json:"status"`
	// Human-readable explanation specific to this occurrence.
	Detail string `json:"detail"`
	// Stable machine-readable error code.
	Code components.PlatformProblemDetailCode `json:"code"`
	// Direct URL to documentation for this error code.
	DocumentationURL *string `json:"documentation_url,omitempty"`
	// Platform-generated request ID for support correlation.
	RequestID string `json:"request_id"`
	// Field-level validation problems, one entry per offending field.
	Errors []components.PlatformProblemDetailError `json:"errors,omitempty"`
	// One entry per tool the caller must authorize.
	AuthenticationSuggestions []components.PlatformAuthenticationSuggestion `json:"authentication_suggestions"`
	HTTPMeta                  components.HTTPMetadata                       `json:"-"`
}

PlatformUnauthorizedAgentToolsProblemError - Problem detail extended with `authentication_suggestions` naming each tool the caller must authorize.

func (*PlatformUnauthorizedAgentToolsProblemError) Error added in v0.13.5

type UnauthorizedAgentToolsError added in v0.13.5

type UnauthorizedAgentToolsError struct {
	// Human-readable description of the failure.
	Message string `json:"message"`
	// One entry per tool the caller must authorize.
	AuthenticationSuggestions []components.ServerToolRequest `json:"authenticationSuggestions"`
	HTTPMeta                  components.HTTPMetadata        `json:"-"`
}

UnauthorizedAgentToolsError - Returned when the agent has tools the caller must authorize before the run can start. Each entry in `authenticationSuggestions` names one such tool; POST its `serverId` to `/tool-servers/{serverId}/auth` with `returnUrl` in the request body to obtain an `authorizationUrl` to redirect the end user to, then retry the run once OAuth completes.

func (*UnauthorizedAgentToolsError) Error added in v0.13.5

Jump to

Keyboard shortcuts

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