mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-09-01 20:16:27 +02:00
fix(youtube/sponsorblock): parse the error response on code 400 (#169)
This commit is contained in:
parent
9255fa30fa
commit
5ab26a427b
@ -102,7 +102,7 @@ public class SBRequester {
|
||||
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());
|
||||
@ -222,4 +222,4 @@ public class SBRequester {
|
||||
private static JSONObject getJSONObject(Route route, String... params) throws Exception {
|
||||
return Requester.getJSONObject(getConnectionFromRoute(route, params));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user