cleanup code

This commit is contained in:
stefanodvx 2025-04-15 10:46:54 +02:00
parent 26452d0f53
commit c06c7958e2
10 changed files with 64 additions and 14 deletions

View file

@ -198,6 +198,16 @@ func HandleErrorMessage(
err error,
) {
currentError := err
if errors.As(currentError, context.Canceled) ||
errors.As(currentError, context.DeadlineExceeded) {
SendErrorMessage(
bot, ctx,
"download request canceled or timed out",
)
return
}
for currentError != nil {
var botError *util.Error
if errors.As(currentError, &botError) {