Error Handling in callwithrequest

Hello Team,

I am working on custom kibana plugin ,where i am executing 'GET' and 'POST' requests
I think plugin uses hapi js and saw Joi code in index.js
could you please help me with effective error handling in callwithrequest.

Thank you,
Aditya

callWIthRequest returns a promise, so either async/await or catching the error.

https://github.com/elastic/kibana/blob/33c237e187156777f1344b49c4b8445658ade224/x-pack/legacy/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern.js#L35 has an example. Does that help?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.