Hello All,
through my application, i send sms to my customers. In order to check if the sms delivered successfully, i have create an Expose Rest API in order to receive call back(s). Note that the provided parameters values and structure are correct.
The sms delivered successfully to my customers. The sms provided inform me that they get response error code 425.
What this error code means and how it fixed?
Hi, George, the error 425: “Too Early.” This code is sent when the server is unwilling to process a request because it may be replayed.
Check this article explaining the error codes
https://kinsta.com/blog/http-status-codes/
And how it solved?
I'm not sure I will help you correctly cuz its out of my comfort zone but by my reading looks like the data is being sent before the TLS/SSL Handshake.
Some servers will send the 425 error and the client will retry automatically and in the second request will accept (I think is your case cuz you said the sms were sent)
Possible solutions(just ideas, not sure about it):
Disabling the server from accept early data (also known as zero round trip data or 0-RTT data).
Delaying the data until handshake
You can read more here, for me was a good point to start to understand the problem: https://tools.ietf.org/id/draft-ietf-httpbis-replay-01.html
Hope I could help you somehow
Cheers
Carlos Lessa
Carlos maybe you confused. The response error 425 sent by outsystems to the sms provider.
Just to explain the flow. My application make a call to sms provider API. The sms sent successfully. Then, the provider make a call back to my application in order to inform that the sms sent or not. On this point, the sms provider call back but my application response with error 425.
so, what should i do from myside?
Hi George, what I explained before could also be applied in your case, as you said the error is 425, the callback is sending data to OutSystems before the handshake.
Can you give me more context from your integration? share the oml or send pics from the integration method?
Do you have any security applied on the call? eg:
When a request to your REST API Method is received, OutSystems executes the following flow:
https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Expose_REST_APIs
Can you debug and check where the error occurs? or if you arrive in any of those steps above?
I called your api passing some dummy values using Postman and got 200 status ok
Your Outsystems server is possible blocking the access to the api from the intermediate server that is trying to use this callback api
Cheers,
Hello Carlos,
thanks for your reply, its s very useful. You may find below my call back settings view
I enable debu and the debuging is not executed because the call back never executed in my api.
How can i check if my outsystem server is blocking the access to the api from the intermediate server ?
You believe that i should disable the Http security from SSL/TLS to None?
Please check with the Network admin about the securities rules from your server, sometimes is just the server blocking the request or refusing it bcuz some rules they may have.
About the debug you did tried to do , you could add a custom authentication that create the onRequest flow and check if you receive the request, I'm not sure, but possible you are not passing the step 1, but check it just in case, if you can debug the on request, the debug of your code would be the step 5 but you aren't arriving there
About the " disable the Http security from SSL/TLS to None " I wouldn't advise that, but you can disable for a moment just to test if will change anything.
Talk first with your Network admin he maybe will know how to check why the server is raising this error
I will try to check this SMS.to when I have time
Thanks Carlos for your reply.
I am not in production enviroment, but in Development. How and what the Network admin can check, as per our suggestion?
another point in the SMS.to website, it says that your callback should be a Post method and you are using a get, try to make this change and test it again
cheers,
I test it and the problem remains.
Also i target my end point and the below message displayed
{"Message":"The requested resource does not support http method 'GET'."}
and what is the SMS provider you are using?
SMS.to