Skip to content

Protect against overflows caused by large expirations#1390

Merged
Xithrius merged 2 commits into
python-discord:masterfrom
ChrisLovering:Handle-OverflowErrors
Feb 1, 2021
Merged

Protect against overflows caused by large expirations#1390
Xithrius merged 2 commits into
python-discord:masterfrom
ChrisLovering:Handle-OverflowErrors

Conversation

@ChrisLovering
Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering commented Jan 30, 2021

Closes #1225 and #1369.

Excepting ValueError catches dates that would go above the year 9999, but very large numbers can cause an OverflowError to be thrown instead. This deals with both in the same way.

ValueError (Current behaviour)
image

OverflowError (New behaviour)

image

@coveralls
Copy link
Copy Markdown

coveralls commented Jan 30, 2021

Coverage Status

Coverage remained the same at 56.593% when pulling 90f4293 on ChrisLovering:Handle-OverflowErrors into ced0af2 on python-discord:master.

@Xithrius Xithrius added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) p: 2 - normal Normal Priority t: feature New feature or request labels Jan 31, 2021
Copy link
Copy Markdown
Contributor

@Akarys42 Akarys42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Xithrius Xithrius merged commit 79bfab3 into python-discord:master Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) p: 2 - normal Normal Priority t: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The reminder command doesn't properly handle overflowing durations Gracefully handle OverflowErrors from ConversionErrors

4 participants