Skip to content

Commit

Permalink
fix(youtube/sponsorblock): parse the error response on code 400 (ReVa…
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Oct 4, 2022
1 parent 9255fa3 commit 5ab26a4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static void submitSegments(String videoId, String uuid, float startTime,
SponsorBlockUtils.messageToToast = str("submit_failed_rate_limit");
break;
case 400:
SponsorBlockUtils.messageToToast = str("submit_failed_invalid", connection.getErrorStream());
SponsorBlockUtils.messageToToast = str("submit_failed_invalid", Requester.parseErrorJson(connection));
break;
default:
SponsorBlockUtils.messageToToast = str("submit_failed_unknown_error", responseCode, connection.getResponseMessage());
Expand Down Expand Up @@ -222,4 +222,4 @@ private static HttpURLConnection getConnectionFromRoute(Route route, String... p
private static JSONObject getJSONObject(Route route, String... params) throws Exception {
return Requester.getJSONObject(getConnectionFromRoute(route, params));
}
}
}

0 comments on commit 5ab26a4

Please sign in to comment.