node-steam-tradeoffer-manager: Detecting invalid cookies

Tradeoffer manager is currently detecting certain cases, when the trade offer simply cannot be sent/accepted, e.g. NewDevice. However, it’s still not detecting invalid cookies.

If cookies become invalid, it’s impossible to accept or send any trade offer without “refreshing” the cookies.

Manager currently does this:

  • when accepting trade offer, manager will return error “HTTP error 403”. If auto-retry is enabled, manager will attempt to repeatedly accept the trade offer even though it’s impossible
  • when sending trade offer, manager will emit error “HTTP error 401”

It’s possible to detect invalid cookies by checking the response from request module. In both cases, the cookie header will no longer contain steamLogin nor steamLoginSecure cookies.

It would be great if manager detected these cases and provided appropriate error.cause.

Here’s my testing script.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Sorry, I didn’t mention that along with those hooks, the latest version of steamcommunity also has a sessionExpired event.