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

Different errors assigned to the same code 209 #2626

Closed
courteouselk opened this issue Aug 31, 2016 · 1 comment
Closed

Different errors assigned to the same code 209 #2626

courteouselk opened this issue Aug 31, 2016 · 1 comment

Comments

@courteouselk
Copy link

If I do PFSession.getCurrentSession() right after the call to PFUser.logOut() then I receive [Error]: Session token required. (Code: 209, Version: 1.14.2).

After checking the documentation I see another kind of error assigned to the same code 209, that is, InvalidSessionToken with description:

The device’s session token is no longer valid. The application should ask the user to log in again.

The "problem" is, I got into present situation after doing exactly that, that is logging the user out after I receive another kind of 209 error, namely "Invalid session token".

IMO, the "session token required" state should have a different error code, not colliding with "invalid session token". Is this something by-design or a bug?

I use Parse Server version 2.2.18 with Parse-SDK-iOS-OSX version 1.4.2.

@hramos
Copy link
Contributor

hramos commented Aug 31, 2016

This is by design, the 209 error code indicates that a valid session token was not found. This can be either due to a token that has been invalidated, or due to a lack of a session token (as is the case after logging out).

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

No branches or pull requests

2 participants