forked from loafle/openapi-generator-original
fix networ error excetption for synchronous requests [android-volley-library]
This commit is contained in:
@@ -120,6 +120,9 @@ public class {{classname}} {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
|
||||
Reference in New Issue
Block a user