This pull request addresses an issue that was occurring in the Beacon project. Previously, when creating a hike, an exception was thrown with the message: Exception: Invalid argument (scheduledDate): Must be a date in the future: Instance of 'TZDateTime'.
The root cause of this issue was that the scheduledDate argument was not properly validated to ensure it was a future date. This resulted in an invalid argument exception when the scheduledDate was not in the future.
In this pull request, I have implemented a fix for this issue. Now, instead of throwing an exception, the application will display a user-friendly error message: "Beacon start time must be at least an hour from now". This message is displayed when the scheduledDate is less than an hour from the current time.
This fix improves the user experience by providing a more informative and understandable error message. It also prevents the application from crashing due to an unhandled exception.
Changes:
Added validation for scheduledDate to ensure it is at least an hour in the future.
Updated error messaging to inform the user when the scheduledDate is too soon.
Please review and provide any feedback. Thank you!
Fixes #192
Description:
This pull request addresses an issue that was occurring in the Beacon project. Previously, when creating a hike, an exception was thrown with the message:
Exception: Invalid argument (scheduledDate): Must be a date in the future: Instance of 'TZDateTime'
.The root cause of this issue was that the
scheduledDate
argument was not properly validated to ensure it was a future date. This resulted in an invalid argument exception when thescheduledDate
was not in the future.In this pull request, I have implemented a fix for this issue. Now, instead of throwing an exception, the application will display a user-friendly error message: "Beacon start time must be at least an hour from now". This message is displayed when the
scheduledDate
is less than an hour from the current time.This fix improves the user experience by providing a more informative and understandable error message. It also prevents the application from crashing due to an unhandled exception.
Changes:
scheduledDate
to ensure it is at least an hour in the future.scheduledDate
is too soon.Please review and provide any feedback. Thank you!
https://github.com/CCExtractor/beacon/assets/143318563/4d5bb483-4a7e-4e3a-9c39-bc7d8bd2b2f6