mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
fix networ error excetption for synchronous requests [android-volley-library]
This commit is contained in:
parent
51468503b2
commit
97e1d1e273
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user