Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Better Error handling for empty token list in Messaging send_each_multicast

Aperta
#792 1 commento 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Inizia in firebase_admin/messaging.py, in send_each_multicast, intorno alla riga collegata, e traccia il percorso con cui un elenco vuoto di token del dispositivo raggiunge send_each e il thread pool. Confronta la posizione alternativa in send_each. Il lavoro è completato quando un elenco vuoto produce un ValueError descrittivo invece dell’attuale errore relativo a max_workers sconosciuto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

api: messaging type: feature request

Problem
Non-descriptive error message returned when sending multicast message with empty device token list. Currently the empty list of tokens propagates throughout the code and results in an Unknown Error type with a vague error message as follows: "Unknown error while making remote service calls: max_workers must be greater than 0". This error seems to originate here as the Threadpool is created with max_workers based on the length of the messages parameter, which is ultimately dependent on the number of tokens in the Message object.

Describe the solution you'd like
Check the length of device tokens directly in the send_each_multicast method and return a descriptive ValueError in the event of an empty list. here

Describe alternatives you've considered
Check the length of the message directly in the send_each class method here.

Lingua principale
Python
Stelle
1.2k
Fork
359
Merge medio
5g 6m
PR unite (30g)
2

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-admin-python

Tutte le issue di firebase/firebase-admin-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.