This adds a more robust error handler class that adds the ability to intercept total network failures like failing to connect. In today's world these errors just throw up out unirest.
It is possible with this to either craft a default response or re-attempt the connection, however keep in mind that Unirest ALREADY attempts to retry a network issue 3 times before throwing an exception so the odds that this handler would be successful with the same request are pretty bad.
This is more likely useful in logging such errors or executing backup plans
This adds a more robust error handler class that adds the ability to intercept total network failures like failing to connect. In today's world these errors just throw up out unirest.
It is possible with this to either craft a default response or re-attempt the connection, however keep in mind that Unirest ALREADY attempts to retry a network issue 3 times before throwing an exception so the odds that this handler would be successful with the same request are pretty bad.
This is more likely useful in logging such errors or executing backup plans