Open teocomi opened 6 years ago
I would see the easiest way to fix this via an InternetAccess
flag which can be checked in the PrepareRequest
and execeptions thrown. https://github.com/speckleworks/SpeckleCore/blob/master/SpeckleCore/SpeckleApiClientHead.cs#L58
I'm hesitant to change the autogenerated code, as it will make subsequent future generations more painful. But if nswag can be coerced into adding that catch, i'm fine :)
Should probably throw an exception when no internet is available or the API cannot be reached. If the call below fails there is not
catch
to handle it: https://github.com/speckleworks/SpeckleCore/blob/a8c054ab499578bd3f014a5298c5e99db460f382/SpeckleCore/SpeckleApiClientApiCalls.cs#L337