cleanup code
This commit is contained in:
parent
26452d0f53
commit
c06c7958e2
10 changed files with 64 additions and 14 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue