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

Y24-288 - [BUG] Exception 28/08/2024 at 16:31 #827

Closed
2 tasks
yoldas opened this issue Aug 29, 2024 · 1 comment · Fixed by #847
Closed
2 tasks

Y24-288 - [BUG] Exception 28/08/2024 at 16:31 #827

yoldas opened this issue Aug 29, 2024 · 1 comment · Fixed by #847
Assignees
Labels
Bug Something isn't working

Comments

@yoldas
Copy link
Member

yoldas commented Aug 29, 2024

Email subject line

[Psd-exceptions] [LabWhere PRODUCTION] location_finder#create (NoMethodError) “undefined method `[]' for nil:NilClass”

Error body

A No occurred in location_finder#create:

  undefined method `[]' for nil:NilClass
  app/forms/location_finder_form.rb:33:in `assign_params'

Acceptance Criteria

  • Look into this exception and fix the code to handle the exception sensibly.
  • Document the root cause and solution in a comment on this issue.

Additional information

The id of the user who triggered this error is often shown in the exception email, in case you need to communicate with them.

@yoldas yoldas added the Bug Something isn't working label Aug 29, 2024
@psd-issuer psd-issuer bot changed the title [BUG] Exception at 28/08/2024 at 16:31 Y24-288 - [BUG] Exception at 28/08/2024 at 16:31 Aug 29, 2024
@yoldas yoldas changed the title Y24-288 - [BUG] Exception at 28/08/2024 at 16:31 Y24-288 - [BUG] Exception 28/08/2024 at 16:31 Aug 29, 2024
@BenTopping BenTopping self-assigned this Sep 23, 2024
@BenTopping
Copy link
Contributor

Fix linked in PR above.

Cause

When no file was provided on the find locations page, and the form was submitted, this error occured.
This is because the logic in the location finder form was not handling missing file cases gracefully.

Fix

Made the file upload a required field in order to submit the form.
Added error handling in location finder form for dealing with a missing file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants