@Baharul Islam Thanks for reaching out. Unfortunately, the HTTP connector is retry based on the status code as documented here. There is no configuration or out of box solution that can help you with your use case for retry based on the error messages rather than the status code.
You need to handle this with your custom solution and Handle errors and exceptions in Azure Logic Apps document cover how you can leverage run after
behavior while handling the error/exception in logic app. The third-party reference article that you have shared covers the same.
Let me know if you have any queries or concerns.