| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Reviewer's GuideThe PR updates the Baileys startup service to immediately fail when download retries cannot determine the media type or when the fallback download itself fails, ensuring incomplete media doesn’t propagate further. Sequence diagram for updated media download error handlingsequenceDiagram
participant Service as BaileysStartupService
participant Logger
participant Downloader as downloadContentFromMessage
participant ErrorHandler
Service->Downloader: Attempt to download media
alt Download fails
Service->Logger: Log error (Download Media failed, retrying...)
Service->Service: Wait 5 seconds
Service->Service: Determine mediaType
alt mediaType not found
Service->ErrorHandler: Throw Error('Could not determine mediaType for fallback')
else mediaType found
Service->Downloader: Attempt fallback download
alt Fallback download fails
Service->Logger: Log error (Fallback download failed)
Service->ErrorHandler: Throw fallbackErr
else Fallback download succeeds
Service->Logger: Log success
end
end
else Download succeeds
Service->Logger: Log success
end
Class diagram for BaileysStartupService error handling changesclassDiagram
class BaileysStartupService {
+downloadMedia(msg)
}
BaileysStartupService : +logger
BaileysStartupService : +downloadMedia(msg)
BaileysStartupService : Throws Error if mediaType not found
BaileysStartupService : Throws fallbackErr if fallback download fails
File-Level Changes
Tips and commands Interacting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sorry, something went wrong.
|
Opa. De curiosidade qual erro teve? |
Sorry, something went wrong.
as medias não estavam gerando o base64, aleatoriamente, tava dando um erro de timeout dentro da bailyes, ai como não tinha a exceção não dava pra ver no log |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Caras, eu perdi horas tentando debugar um erro nada a ver porque essa função não estava levantando uma exceção quando falhava no download, isso fazia os objetos chegarem incompletos no restante do codigo, gerando outros erros.
Ref: #1699
Summary by Sourcery
Throw errors when media download fails to ensure failures are surfaced
Bug Fixes: