Below is a simplified snippet of my project’s code,
just including how it handles login and logout.
;(async () => {
while (true) {
try {
await client.login();
} catch (err) {
// Print and log error to disk
}
// Main program logic
try {
await client.logout();
} catch (err) {
// Print and log error to disk
}
await sleep(INTERVAL);
}
});
Once it reaches await client.logout();, it returns the error StatusCodeError with an error message of “405 - undefined”.
As far as I know from a quick google search, a 405 status response is for “Method Not Allowed”. I am using persistent cookie storage and the login / API calls on the main program logic works perfectly fine, so I know this is not a token/authentication issue. 2-factor authentication is not being used in the account logged in.
Does client.logout() use a deprecated API call? If not, please let me know what could be going wrong? Thanks.
Below is a simplified snippet of my project’s code, just including how it handles login and logout.
Once it reaches
await client.logout();
, it returns the errorStatusCodeError
with an error message of “405 - undefined”.As far as I know from a quick google search, a 405 status response is for “Method Not Allowed”. I am using persistent cookie storage and the login / API calls on the main program logic works perfectly fine, so I know this is not a token/authentication issue. 2-factor authentication is not being used in the account logged in. Does
client.logout()
use a deprecated API call? If not, please let me know what could be going wrong? Thanks.