public CheckForUpdatesResponse m8213a(String str, String str2, BuildProperties buildProperties) {
   Throwable e;
   Throwable th;
   CheckForUpdatesResponse checkForUpdatesResponse = null;
   HttpRequest a;
   try {
     Map a2 = m8212a(buildProperties);
     try {
       a = m8211a(m7990a(a2), str, str2);
       Fabric.m12905g().m12867a("Beta", "Checking for updates from " + m7991a());
       Fabric.m12905g().m12867a("Beta", "Checking for updates query params are: " + a2);
       if (a.m13216c()) {
         Fabric.m12905g().m12867a("Beta", "Checking for updates was successful");
         checkForUpdatesResponse = this.f5534b.m8214a(new JSONObject(a.m13221e()));
         if (a != null) {
           Fabric.m12905g()
               .m12867a("Fabric", "Checking for updates request ID: " + a.m13212b("X-REQUEST-ID"));
         }
       } else {
         Fabric.m12905g()
             .m12873d("Beta", "Checking for updates failed. Response code: " + a.m13210b());
         if (a != null) {
           Fabric.m12905g()
               .m12867a("Fabric", "Checking for updates request ID: " + a.m13212b("X-REQUEST-ID"));
         }
       }
     } catch (Exception e2) {
       e = e2;
       try {
         Fabric.m12905g().m12874d("Beta", "Error while checking for updates from " + m7991a(), e);
         if (a != null) {
           Fabric.m12905g()
               .m12867a("Fabric", "Checking for updates request ID: " + a.m13212b("X-REQUEST-ID"));
         }
         return checkForUpdatesResponse;
       } catch (Throwable th2) {
         th = th2;
         if (a != null) {
           Fabric.m12905g()
               .m12867a("Fabric", "Checking for updates request ID: " + a.m13212b("X-REQUEST-ID"));
         }
         throw th;
       }
     }
   } catch (Exception e3) {
     e = e3;
     a = null;
     Fabric.m12905g().m12874d("Beta", "Error while checking for updates from " + m7991a(), e);
     if (a != null) {
       Fabric.m12905g()
           .m12867a("Fabric", "Checking for updates request ID: " + a.m13212b("X-REQUEST-ID"));
     }
     return checkForUpdatesResponse;
   } catch (Throwable e4) {
     a = null;
     th = e4;
     if (a != null) {
       Fabric.m12905g()
           .m12867a("Fabric", "Checking for updates request ID: " + a.m13212b("X-REQUEST-ID"));
     }
     throw th;
   }
   return checkForUpdatesResponse;
 }