mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 21:52:32 -06:00
WebAPI: Respond with more detailed info
* WebAPI: return error message when endpoint not found * WebAPI: send appropriate status code when logging in * WebAPI: return more info when adding torrents PR #23202. Closes #375. Closes #10688. Closes #10747. Closes #11464.
This commit is contained in:
committed by
GitHub
parent
69b2d7a53e
commit
7ddbf58a3b
@@ -45,12 +45,12 @@ const submitLoginForm = (event) => {
|
||||
})
|
||||
})
|
||||
.then(async (response) => {
|
||||
const responseText = await response.text();
|
||||
if (response.ok && (responseText === "Ok.")) {
|
||||
if (response.ok) {
|
||||
location.replace(location); // redirect
|
||||
location.reload(true);
|
||||
}
|
||||
else {
|
||||
const responseText = await response.text();
|
||||
errorMsgElement.textContent = `QBT_TR(Invalid Username or Password.)QBT_TR[CONTEXT=Login]\nQBT_TR(Server response:)QBT_TR[CONTEXT=Login] ${responseText}`;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user