Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 5ab26a4

Browse files
author
caneleex
authored
fix(youtube/sponsorblock): parse the error response on code 400 (#169)
1 parent 9255fa3 commit 5ab26a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • app/src/main/java/app/revanced/integrations/sponsorblock/requests

app/src/main/java/app/revanced/integrations/sponsorblock/requests/SBRequester.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static void submitSegments(String videoId, String uuid, float startTime,
102102
SponsorBlockUtils.messageToToast = str("submit_failed_rate_limit");
103103
break;
104104
case 400:
105-
SponsorBlockUtils.messageToToast = str("submit_failed_invalid", connection.getErrorStream());
105+
SponsorBlockUtils.messageToToast = str("submit_failed_invalid", Requester.parseErrorJson(connection));
106106
break;
107107
default:
108108
SponsorBlockUtils.messageToToast = str("submit_failed_unknown_error", responseCode, connection.getResponseMessage());
@@ -222,4 +222,4 @@ private static HttpURLConnection getConnectionFromRoute(Route route, String... p
222222
private static JSONObject getJSONObject(Route route, String... params) throws Exception {
223223
return Requester.getJSONObject(getConnectionFromRoute(route, params));
224224
}
225-
}
225+
}

0 commit comments

Comments
 (0)