package com.fyber.inneractive.sdk.network; import com.fyber.inneractive.sdk.util.IAlog; import java.io.FilterInputStream; import java.util.Map; /* loaded from: classes2.dex */ public class h { public static j a(FilterInputStream filterInputStream, int i, String str, Map map, String str2) throws x0, b { try { j jVar = new j(filterInputStream, i, str, map, str2); if (jVar.a / 100 != 5) { return jVar; } throw new b(String.format("server returned error %d", Integer.valueOf(jVar.a))); } catch (b e) { IAlog.a("failed executing network request", e, new Object[0]); throw new b(e); } catch (Exception e2) { IAlog.a("failed reading network response", e2, new Object[0]); throw new x0(e2); } } }