Show qBittorrent auth response in error message for debugging
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -21,7 +21,7 @@ async function getCookie(): Promise<string> {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const cookie = (res.headers['set-cookie'] ?? []).find((c: string) => c.startsWith('SID='))
|
const cookie = (res.headers['set-cookie'] ?? []).find((c: string) => c.startsWith('SID='))
|
||||||
if (!cookie || res.data === 'Fails.') throw new Error('qBittorrent login failed')
|
if (!cookie) throw new Error(`qBittorrent login failed: ${String(res.data).trim()}`)
|
||||||
|
|
||||||
sid = cookie.split(';')[0]
|
sid = cookie.split(';')[0]
|
||||||
sidExpiry = Date.now() + 55 * 60 * 1000
|
sidExpiry = Date.now() + 55 * 60 * 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user