Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use custom error to capture source #791

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scottlepp
Copy link
Contributor

@scottlepp scottlepp commented Oct 26, 2023

Currently a lot of plugins, including in core grafana, partner, enterprise etc don't consistently return errors. It's a bit unclear as to when an error should be returned vs returning a response with an error.

If a plugin fails to connect during QueryData, should it return an error? or return a response with an error? Because it is unclear, many plugins return an error in that scenario.

Regardless, rather than change all the plugins, we can just return an error that includes the source.

Had to move the custom error out of experimental to avoid a cycle. The real change is here.

NOTE: this only allows returning a custom error in the response, rather than an error_source. we still need a way to handle returning a custom error, outside of the response, that includes the error source

@scottlepp scottlepp requested a review from a team as a code owner October 26, 2023 20:34
@scottlepp scottlepp requested review from wbrowne, andresmgot and oshirohugo and removed request for a team October 26, 2023 20:34
@scottlepp scottlepp mentioned this pull request Oct 26, 2023
@wbrowne wbrowne removed their request for review February 12, 2024 10:31
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale Issue or PR without activity label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue or PR without activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant