Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed expired session detection. #311

Merged
merged 2 commits into from
Oct 18, 2017
Merged

Fixed expired session detection. #311

merged 2 commits into from
Oct 18, 2017

Conversation

jsarasti
Copy link
Contributor

Apart from the session expired error fixed here, most of the request errors should be handled similarly.

@codecov-io
Copy link

codecov-io commented Oct 17, 2017

Codecov Report

Merging #311 into master will decrease coverage by 0.16%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #311      +/-   ##
==========================================
- Coverage   45.99%   45.82%   -0.17%     
==========================================
  Files           9        9              
  Lines         848      851       +3     
  Branches      121      122       +1     
==========================================
  Hits          390      390              
- Misses        446      449       +3     
  Partials       12       12
Impacted Files Coverage Δ
fut/core.py 32.23% <0%> (-0.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88b9ef4...1717213. Read the comment docs.

@oczkers
Copy link
Member

oczkers commented Oct 18, 2017

most of the request errors should be handled similarly.

Do You mean checking reason too?

There are http error codes hardcoded in javascript so browser is probably not checking this either:

enums.HTTPStatusCode=enums.HTTPStatusCode = {
UNKNOWN: 0,
OK: 200,
NO_CONTENT: 204,
BAD_REQUEST: 400,
UNAUTHORIZED: 401,
FORBIDDEN: 403,
NOT_FOUND: 404,
CONFLICT: 409,
UNSUPPORTED_TYPE: 415,
RATE_LIMIT: 429,
FUN_CAPTCHA_REQUIRED: 458,
CAPTCHA_REQUIRED: 459,
UT_BAD_REQUEST: 460,
PERMISSION_DENIED: 461,
STATE_INVALID: 462,
NO_BID_TOKENS: 463,
NO_USER: 465,
NAME_EXISTS: 466,
PROFANITY: 467,
LOGGED_IN_ON_CONSOLE_LEGACY: 468,
DELETING_LAST_SQUAD: 469,
NOT_ENOUGH_CREDIT: 470,
ITEM_EXISTS: 471,
DUPLICATE_ITEM_TYPE: 472,
DESTINATION_FULL: 473,
LOGGED_IN_ON_CONSOLE: 474,
NO_CARD_EXISTS: 475,
CARD_IN_TRADE: 476,
INVALID_DECK: 477,
NO_TRADE_EXISTS: 478,
INVALID_OWNER: 479,
SERVICE_IS_DISABLED: 480,
ACCOUNT_LOCKED: 481,
INVALID_COOKIE: 482,
ALREADY_ANSWERED_PHISHING_QUESTION: 483,
NO_REMAINING_ATTEMPTS: 485,
PLAYER_HAS_RED_CARD: 486,
REMOVE_WATCH_FAILURE: 487,
SWAP_ITEM_WITH_ITSELF: 488,
USER_IS_HIGHEST_BIDDER: 489,
DID_CREATE_EXCEEDED: 489,
DID_LOGIN_EXCEEDED: 490,
LOCKED_TRANSFER_MARKET: 494,
SOME_ITEMS_NOT_FREE: 495,
SERVER_ERROR: 500,
SERVICE_UNAVAILABLE_ERROR: 503,
UNRECOVERABLE_ERROR: 1e4,
NO_INTERNET_CONNECTION: 10666,
NETWORK_ERROR: 10667,
REQUEST_TIME_OUT: 10668,
FIFA_POINTS_FAILED: 10670,
ACCOUNT_BANNED: 2e4,
UPDATE_REQUIRED: 20001,
INVALID_CREDENTIALS: 20002
},
enums.NetworkError = enums.HTTPStatusCode,
enums.NetworkErrorReason = {
MULTIPLE_SESSION: "multiple session",
WRONG_CREDENTIALS: "Wrong credentials",
INVALID_CREDENTIALS: "invalid credentials",
BANNED: "BANNED",
CLIENT_VERSION_EXPIRED: "client version expired",
CLIENT_VERSION_UNKNOWN: "unknown client

@oczkers oczkers merged commit 9b3d694 into futapi:master Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants