-
Notifications
You must be signed in to change notification settings - Fork 27
api timeout setting #47
Comments
Hi @armyofda12mnkeys! We are currently experiencing degraded performance due to an AWS issue (see https://status.hellosign.com/). You're right that the timeout should be configurable however, I'm marking this as an enhacement. |
Awesome. do you think it will throw a subclass exception like 'HellosignTimeoutException' so kinda related to issue #45 (not sure if it would be the same 404 Exception or slightly different)? |
@armyofda12mnkeys Sounds like we can do two things:
For item 2, I may bundle that with issue #46 (handle 409 responses). Would a new exception class be preferable to a new method on |
Can an Exception sometimes not be tied to a response code? Just an idea, wasn't sure if that makes sense or breaks things. EDIT: Im not sure the actual implemention of extending the error ... subclass/interface or just a enum that defines the types which pass into the Exception to define it which user can , like here are my own personal Exceptions related to our app tied to Hellosign (not sure if this is good code from my end but it works for our own errors hehe [Im more of a web developer]):
|
@armyofda12mnkeys Thanks for the explanation. I'd like to avoid having you write your own exception handling for server maintenance or timeouts. The way I envision it, you should only ever have to worry about one type of exception ( |
yah, i was just giving an example our own Exceptions (related to Hellosign but separate than yours to give an example how i use simple enums to define our Exception types)... Like if a user tries to get an esign 5 times in a row in our public-facing app (using up 5 api requests) ... we allow the 1st 5 so if user modified data then shows up prefilled in a new esign presented to them... but if >5, we throw our own ESIGN_API_RECREATION_LIMIT exception and i handle it by showing the last signature-id(without need to recreate the esign waisting a 'full/heavy' api request that counts against our limit). yes def have the timeouts/etc in your own Exception code. Just giving example of my own simple exceptions. |
Ah, makes sense, thanks for the example! That will be helpful. :) |
Hey @cmpaul , I did see another outage (Monday from 4-5pm EST and some maintenance updates the other day) so would be very interested in this 'timeout setting and returns nice Exceptions' feature. |
@armyofda12mnkeys No progress yet, let me prioritize this. I'm also still trying to gauge whether I can bundle this as part of a larger move to something like OkHttp. Originally I had wanted to keep this SDK lean and mean, but that limits the kind of functionality we can add (like this!). |
@jspaetzel Do we have any plans to resolve this in the near future? We have a customer asking about this capability. |
@latoyazamill not on my roadmap at the moment |
This became an issue today when it took minutes for requests to timeout. |
At first glance the implementation utilizes java.net.URLConnection which supports a connect and read timeout. |
Noticed today it took minute(s) to connect to hellosign from our servers via the java sdk code I have (maybe issue from our end or your end, not sure yet)... Is there anyway to set a timeout manually with a method of pretend 10seconds so I can control what happens if taking too long/times-out?
The text was updated successfully, but these errors were encountered: