[FR] Allow `messaging.subscribe_to_topic` to return more verbose information on failure
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the messaging.subscribe_to_topic call shown in the example and compare its failure response with the requested device_id information. Check whether unsubscribe_from_topic should expose the same details. Done means failed device IDs are available to callers for both operations without breaking existing response handling.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
It frustrates our team that each time our mobile app is updated and our users open the app, a new device_id is generated. We are saving this new device_id to the user, because we can't know for sure that the user haven't just bought a new phone and installed the app into that new phone as well. This leads to the problem that when we subscribe users to a topic, with all their device ids, we get many Errors ['NOT_FOUND', 'NOT_FOUND', 'NOT_FOUND', 'NOT_FOUND', 'NOT_FOUND', 'NOT_FOUND'] returned.
Describe the solution you'd like
We'd like that the API returns a list of failed device_ids so that we can delete those from our database. We'd love to see this extended to messaging.unsubscribe_from_topic as well.
Describe alternatives you've considered
Digging through the firebase code doesn't give any hints that the information we're looking for is discarded in transit.
Additional context
Code example:
from firebase_admin import messaging
def do_subscribe(tokens, topic):
response = messaging.subscribe_to_topic(tokens, topic)
if response.failure_count > 0:
logger.error(
f"Errors {list(map(lambda e: e.reason, response.errors))}",
exc_info=False,
)
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 359
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-python
-
api: remoteconfig
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
firebase/firebase-admin-python#957 · 1 comment ·
-
api: database type: feature request
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/firebase-admin-python#978 · 1 comment ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) Openapi: auth
firebase/firebase-admin-python#949 · 2 comments · 1 reaction · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
firebase/firebase-admin-python#945 · 1 comment · 1 reaction ·
All issues in firebase/firebase-admin-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·