File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
server/services/qBittorrent Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,25 +83,25 @@ class ClientRequestManager {
83
83
async updateConnection ( connectionSettings ?: QBittorrentConnectionSettings ) : Promise < void > {
84
84
let failed = false ;
85
85
86
- this . authCookie = this . authenticate ( connectionSettings ) . catch ( ( ) => {
87
- failed = true ;
86
+ this . authCookie = this . authenticate ( connectionSettings ) . catch ( ( reason ) => {
87
+ failed = reason ;
88
88
return undefined ;
89
89
} ) ;
90
90
91
91
this . apiVersion = this . authCookie
92
92
. then ( ( ) => {
93
93
return ! failed ? this . getApiVersion ( ) : Promise . resolve ( undefined ) ;
94
94
} )
95
- . catch ( ( ) => {
96
- failed = true ;
95
+ . catch ( ( reason ) => {
96
+ failed = reason ;
97
97
return undefined ;
98
98
} ) ;
99
99
100
100
await this . authCookie ;
101
101
await this . apiVersion ;
102
102
103
103
if ( failed ) {
104
- throw new Error ( ) ;
104
+ throw new Error ( failed ) ;
105
105
}
106
106
}
107
107
You can’t perform that action at this time.
0 commit comments