Documentation
¶
Index ¶
- func AddDownstreamErrorToResponse(refID string, response *backend.QueryDataResponse, err error) *backend.QueryDataResponsedeprecated
- func AddErrorToResponse(refID string, response *backend.QueryDataResponse, err error) *backend.QueryDataResponsedeprecated
- func AddPluginErrorToResponse(refID string, response *backend.QueryDataResponse, err error) *backend.QueryDataResponsedeprecated
- func DownstreamError(err error, _ bool) errordeprecated
- func FromStatus(status backend.Status) backend.ErrorSourcedeprecated
- func Middleware(plugin string) httpclient.Middlewaredeprecated
- func PluginError(err error, _ bool) errordeprecated
- func Response(err error) backend.DataResponsedeprecated
- func RoundTripper(_ httpclient.Options, next http.RoundTripper) http.RoundTripperdeprecated
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDownstreamErrorToResponse
deprecated
added in
v0.188.4
func AddDownstreamErrorToResponse(refID string, response *backend.QueryDataResponse, err error) *backend.QueryDataResponse
AddDownstreamErrorToResponse adds the error as downstream source to the response if the error already has a source, the existing source will be used
Deprecated: Use backend.ErrorResponse instead and set the response directly
func AddErrorToResponse
deprecated
added in
v0.188.4
func AddErrorToResponse(refID string, response *backend.QueryDataResponse, err error) *backend.QueryDataResponse
AddErrorToResponse adds the error to the response
Deprecated: Use backend.ErrorResponse instead and set the response directly
func AddPluginErrorToResponse
deprecated
added in
v0.188.4
func AddPluginErrorToResponse(refID string, response *backend.QueryDataResponse, err error) *backend.QueryDataResponse
AddPluginErrorToResponse adds the error as plugin error source to the response if the error already has a source, the existing source will be used
Deprecated: Use backend.ErrorResponse instead
func DownstreamError
deprecated
added in
v0.181.0
func FromStatus
deprecated
added in
v0.188.0
func FromStatus(status backend.Status) backend.ErrorSource
FromStatus returns error source from status
Deprecated: Use backend.ErrorSourceFromHTTPStatus instead
func Middleware
deprecated
func Middleware(plugin string) httpclient.Middleware
Middleware captures error source metric
Deprecated: If you are using sdk httpclient, this is already included in the default middleware. If you are not using the sdk httpclient, you should use httpclient.ErrorSourceMiddleware instead.
func PluginError
deprecated
added in
v0.181.0
func Response
deprecated
added in
v0.188.0
func Response(err error) backend.DataResponse
Response returns an error DataResponse given status, source of the error and message.
Deprecated: Use backend.ErrorResponseWithErrorSource instead
func RoundTripper
deprecated
added in
v0.188.4
func RoundTripper(_ httpclient.Options, next http.RoundTripper) http.RoundTripper
RoundTripper returns the error source
Deprecated: If you are using sdk httpclient, this is already included in the default middleware. If you are not using the sdk httpclient, you should use httpclient.ErrorSourceRoundTripper instead.
Types ¶
type Error ¶
type Error = backend.ErrorWithSource
func SourceError
deprecated
added in
v0.181.0
func SourceError(source backend.ErrorSource, err error, override bool) Error
SourceError returns an error with the source If source is already defined, it will return it, or you can override
Deprecated: Use backend.DownstreamError or backend.PluginError instead