slackapi / slackapi/python-slack-sdk
Retrying internal errors in files_upload_v2
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 4k
- Forks
- 857
- Merge moyen
- 22 h 21 min
- PR mergées (30 j)
- 16
Description
Hi there,
We occasionally see transient errors from the Slack API in calls to files.completeUploadExternal that are done within the SDK's implementation of files_upload_v2. The error we see most frequently error we encounter is file_update_failed, which has more or less no useful explanation on the API docs. Support has also not been very helpful in understanding the nature of these issues: they just said there is a temporary server error, and we should retry the call to completeUploadExternal
Can the Python SDK implement that retr? It doesn't seem like the caller of files_upload_v2 (i.e. our code) could, since that would redo the entire upload. The caller also doesn't have enough information to retry the files.completeUploadExternal call, since the ID is lost when the SDK throws an exception.
I suppose a workaround is to install a custom RetryHandler on the WebClient. But like in #1715, shouldn't that just be part of the SDK?
Category
- slack_sdk.web.WebClient (sync/async) (Web API client)
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par l’implémentation de WebClient.files_upload_v2 du Python SDK et suivez son appel à files.completeUploadExternal. Déterminez comment les erreurs internes transitoires telles que file_update_failed peuvent être réessayées sans répéter l’upload, puis vérifiez que l’upload terminé réussit toujours via le point d’entrée existant de WebClient.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100