Skip to content

Commit

Permalink
Downstream error
Browse files Browse the repository at this point in the history
  • Loading branch information
idastambuk committed Jan 3, 2025
1 parent d091a44 commit 06f4546
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/opensearch/opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,11 @@ func handleServiceMapPrefetch(ctx context.Context, osClient client.Client, req *
func wrapServiceMapPrefetchError(refId string, err error) *backend.QueryDataResponse {
if err != nil {
response := backend.NewQueryDataResponse()
err = errorsource.PluginError(err, false) // keeps downstream source if present
if backend.IsDownstreamError(err) {
err = backend.DownstreamError(err) // keeps downstream source if present
} else {
err = backend.PluginError(err)
}
err = fmt.Errorf(`Error fetching service map info: %w`, err)
return errorsource.AddErrorToResponse(refId, response, err)
}
Expand Down

0 comments on commit 06f4546

Please sign in to comment.