Open rseldner opened 1 year ago
Pinging @elastic/platform-deployment-management (Team:Deployment Management)
this is not limited to the int/long situation. I can see the same thing if we cause a different type of script processor mistake/error:
ctx.test = ctx.my-field
So maybe we just need to see the 400 response's attributes.causes
array to also be presented to the user.
Pinging @elastic/kibana-management (Team:Kibana Management)
Describe the feature: While creating a script processor in an ingest pipeline from the Stack Management UI, if you specify a numeric constant that is too large for
int
type, the UI just spits out ascript processor: compile error
Error Screenshot:
Toast:
The
compile error
message isn't very useful and difficult for users to understand, particularly since the error can potentially be presented outside of the user's view if there are a large amount of processors (i.e. the save button is at the bottom of the page, and user might need to scroll up to the top of the page to see the message).If we were to inspect the browser's HTTP request, or use the Elasticsearch API to create the same pipeline, we can see a very clear and explicit explanation of the problem in the 400 response.
Request:
It would be helpful to users to include this more meaningful information, perhaps in the toast popup. Alternatively, there could be some sort of validation performed when saving the processor but I imagine that is a much more cumbersome approach.
To reproduce...
Create and save a pipeline with the following script processor:
Screenshot
![image](https://user-images.githubusercontent.com/19536095/233137580-7264cbc4-28a9-4b7a-ac6b-680e2d9f8996.png)ES API Equivalent:
``` PUT _ingest/pipeline/script-test { "processors": [ { "script": { "source": "ctx.test = (ctx.myfield * 21448364890)" } } ] } ```