linxGnu / gosmpp

Smpp (3.4) Client Library for Go
Apache License 2.0
152 stars 59 forks source link

Implementation Question: Is there a way to check an error while hitting submit_sm ? #144

Closed bluewithanas closed 5 months ago

bluewithanas commented 6 months ago

I have a case where i am hitting submit_sm and in order to handle errors, i want a way to check what errors i can get and is there a way to custom handle them?

while doing conn.submit(p). where p is pdu.submitSm and conn is connection object i want to check error. err:=conn.submitSm(p) if err!=nil{ errros.Is(err,""){ //check further what errors and what can be handled. } }

i see gosmpp.PDUErrorCallback , is there any example i can get which would be helpful? Do we receive submission related failure on

 #OnSubmitError: func(_ pdu.PDU, err error) {
            log.Fatal("SubmitPDU error:", err)
        },

in go smpp settings??