-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hey there,
you are throwing errors in some cases (like during message creation by default).
Please do not do this, because it will destroy async apps and nodejs lives from async!
if i deactivate websms.doThrowMessageCreationError then the error callback is async, but the success is sync. So I have to check on my own if the createdMessage is corrupt, because the error callback triggers later then the message sending.
It would be nice to have there a success and error callback.
So i can handle it not as dirty i have to do it, yet.
I could use a promise or put the sending block in the success callback of the creation statement.
In general nodejs approaches.
You may also use one callback for each websmscom function.
First argument would be the error or null/undefined and the second argument the successobject (created message or success of sending a message).
Thank you.