-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve and export errors in packages #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, few extremely minor comments continuing the proud tradition of emojis in release notes
@@ -12,7 +11,7 @@ import ( | |||
|
|||
func EvaluateInFrame(expression string, input *data.Frame) (any, error) { | |||
if strings.TrimSpace(expression) == "" { | |||
return nil, errors.New(strings.TrimSpace(fmt.Sprintf("empty/invalid expression. %s", expression))) | |||
return nil, ErrEmptySummarizeExpression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you also log the expression in case we need to find out the query or this surfaced elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be always just empty string or space as we do a check strings.TrimSpace(expression) == ""
. Do you think it would still be valuable, as it is always going to be same/similar thing?
Co-authored-by: Tim Mulqueen <Multimo@users.noreply.github.com>
Co-authored-by: Tim Mulqueen <Multimo@users.noreply.github.com>
Co-authored-by: Tim Mulqueen <Multimo@users.noreply.github.com>
…libs into improve-errors
This PR exports errors so we can check them in Infinity data source and add error source based on error type. This is same as what we did in c9bd79b