mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-05-09 10:54:26 +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");
|
SponsorBlockUtils.messageToToast = str("submit_failed_rate_limit");
|
||||||
break;
|
break;
|
||||||
case 400:
|
case 400:
|
||||||
SponsorBlockUtils.messageToToast = str("submit_failed_invalid", connection.getErrorStream());
|
SponsorBlockUtils.messageToToast = str("submit_failed_invalid", Requester.parseErrorJson(connection));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SponsorBlockUtils.messageToToast = str("submit_failed_unknown_error", responseCode, connection.getResponseMessage());
|
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 {
|
private static JSONObject getJSONObject(Route route, String... params) throws Exception {
|
||||||
return Requester.getJSONObject(getConnectionFromRoute(route, params));
|
return Requester.getJSONObject(getConnectionFromRoute(route, params));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user