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

[Interpreter]: Improve typings for the interpreter's "error" type #38553

Closed
lukeelmers opened this issue Jun 10, 2019 · 4 comments
Closed

[Interpreter]: Improve typings for the interpreter's "error" type #38553

lukeelmers opened this issue Jun 10, 2019 · 4 comments
Assignees
Labels
discuss Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@lukeelmers
Copy link
Member

In #37753 we introduced an interface for the shape of data that's returned by something in the interpreter that's type: 'error':

export interface InterpreterErrorType {
  type: 'error';
  error: unknown;
  info: unknown;
}

We should research the uses of the error type and add more detail around what types of values are passed to error and info so that we can have stronger typings for this interface. We should also consider whether InterpreterErrorType is the clearest name for this.

@lukeelmers lukeelmers added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) :AppArch labels Jun 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@clintandrewhall
Copy link
Contributor

I would expect:

export interface InterpreterError {
  type: 'error';
  error: Error;
  info: string;
}

@timductive timductive added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Jul 18, 2019
@lukeelmers
Copy link
Member Author

This was done in #54342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

4 participants