twilio-professional-services/flex-project-template

Reason is not defined

Closed this issue · 4 comments

Will this work?
I tested the same approach and it ends up with
failed after 0 retry attempts, status code: 500, message: reason is not defined

Ah, I see what is happening here and will fix. However, there's another issue causing your Sync docs to not be created, I would suggest double checking the Sync service SID in your .env.

I know what is happening. An item with the given key already exists in my new create new map item function.
I am just using the same structure as you and I never get the error because of the reason thing.

Does the error look better after the fix was merged?

I fixed it differently in my code by defining the reason variable outside of the client call and assigning it inside catch again.
But I know that it's a stupid workaround. That's why I created the issue to see how to fix it properly.
I will test it tomorrow but I am sure it gonna work.
Thanks :)