Hello i am trying to write dynamic provider which ...
# typescript
r
Hello i am trying to write dynamic provider which will call external api and should cancel the deployment process creation when there is error in the response. Is it possible to do that.?
a
mmh. have you tried throwing an exception ?
r
yes, it gives me: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process...
a
i think i am using the following set up in the
index.js
where i call my custom dynamic providers :
Copy code
module.exports = async function main() {
   const customResource = new CustomProvider(); 
}
i think this could prevent any leaking promises. but I am not sure.
r
Well error happens when create function is called. So it is not in main thread anymore tho if i understand it correclty
a
mmh. do you have a minimal piece of code ?
r
Ok nvm.. could't reproduce it in minimal example so i started to dig more into the problem. Lack of my nodejs knowladge is the real problem here. 🙂
😄 1
Thanks for your assist
🎉 1