Skip to content

Add get_session_token_if_present method#7257

Closed
bendk wants to merge 1 commit intomozilla:mainfrom
bendk:push-xyvyokskknnk
Closed

Add get_session_token_if_present method#7257
bendk wants to merge 1 commit intomozilla:mainfrom
bendk:push-xyvyokskknnk

Conversation

@bendk
Copy link
Contributor

@bendk bendk commented Mar 3, 2026

We're seeing lots of Android errors related to messing session tokens (https://bugzilla.mozilla.org/show_bug.cgi?id=2007418). However, it's not clear that Android really cares about the session token, see the bug.

Let's add a method that returns an optional string rather than throwing and switch Android to using this method. This matches the way they want to get session tokens, since they just catch any errors and return null anyway.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@bendk bendk requested a review from mhammond March 3, 2026 16:10
We're seeing lots of Android errors related to messing session tokens
(https://bugzilla.mozilla.org/show_bug.cgi?id=2007418).  However, it's
not clear that Android really cares about the session token, see the
bug.

Let's add a method that returns an optional string rather than throwing
and switch Android to using this method.  This matches the way they want
to get session tokens, since they just catch any errors and return null
anyway.
@bendk bendk force-pushed the push-xyvyokskknnk branch from 2715361 to 4a07991 Compare March 3, 2026 16:10
@bendk bendk changed the title Add optional get_session_token method Add get_session_token_if_present method Mar 3, 2026
@bendk
Copy link
Contributor Author

bendk commented Mar 5, 2026

After talking this through on Slack, it seems like the session token is expected to be present and it should be an error when it's not. I'm going to close this one and try to figure out how we can ensure that the session token is always there.

@bendk bendk closed this Mar 5, 2026
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.

1 participant