mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
Add error message from server when voting
This commit is contained in:
@@ -125,19 +125,22 @@ async function submitVote(type: number, UUID: string, category: string) {
|
||||
|
||||
if (response.ok) {
|
||||
return {
|
||||
successType: 1
|
||||
successType: 1,
|
||||
responseText: await response.text()
|
||||
};
|
||||
} else if (response.status == 405) {
|
||||
//duplicate vote
|
||||
return {
|
||||
successType: 0,
|
||||
statusCode: response.status
|
||||
statusCode: response.status,
|
||||
responseText: await response.text()
|
||||
};
|
||||
} else {
|
||||
//error while connect
|
||||
return {
|
||||
successType: -1,
|
||||
statusCode: response.status
|
||||
statusCode: response.status,
|
||||
responseText: await response.text()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user