Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully handle the error when visiting the course resources routes that does not exist #1625

Closed
yash-learner opened this issue May 21, 2024 · 1 comment
Labels
invalid This doesn't seem right

Comments

@yash-learner
Copy link
Member

From rollbar error

Describe the bug
Use find_by instead of find and gracefully handle the error. find would raise an Active Record Not Found error when a record is not found and would get caught by Rollbar this happens when users try to resource which does not exist, whereas find_by would return nil without raising an error but nil need to handled.

To Reproduce
Steps to reproduce the behavior:

  1. Go to course curriculum or show page which does not exist. school.localhost/courses/:id
  2. It will raise Active Record Not Found
  3. It will get caught by Rollbar.

Expected behavior
Use find_by and gracefully handle the error

@yash-learner yash-learner linked a pull request May 21, 2024 that will close this issue
10 tasks
@yash-learner yash-learner added the invalid This doesn't seem right label Jun 13, 2024
@yash-learner
Copy link
Member Author

Team decided to record these 404's in Rollbar as it is expected behaviour, when a record is not found

@yash-learner yash-learner closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant