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

Error requesting Resource Sharing item #3948

Closed
1 task done
rladdusaw opened this issue Jan 24, 2024 · 2 comments
Closed
1 task done

Error requesting Resource Sharing item #3948

rladdusaw opened this issue Jan 24, 2024 · 2 comments
Assignees

Comments

@rladdusaw
Copy link
Contributor

rladdusaw commented Jan 24, 2024

Expected behavior

A request should be made

Actual behavior

The request causes an error

Impact of this bug

User is unable to request item

Honeybadger link and code snippet, if applicable

https://app.honeybadger.io/projects/54399/faults/103856161

NoMethodError: undefined method `[]' for nil:NilClass delivery_location.values.first[:contact_email] ^^^^^^^^^^^^^^^^</div>
70 | return I18n.t('requests.on_shelf.email') if library_code == "firestone"
-- | --
71 | delivery_location = Requests::BibdataService.delivery_locations.select { \|_key, value\| value[:library][:code] == library_code }
72 | delivery_location.values.first[:contact_email]
73 | end
74 | end

Implementation notes, if any

Assign this location: https://bibdata.princeton.edu/locations/delivery_locations/12

@kevinreiss
Copy link
Member

kevinreiss commented Jan 24, 2024

Looking at the stacktrace the user selected two volumes (E) and (A). A is already out on loan via Borrow Direct. The error came up because the code asked for a contact email from this location https://bibdata.princeton.edu/locations/holding_locations/RES_SHARE$IN_RS_REQ which has no delivery locations attached. I'm not 100 sure why the code is calling this a for an item that is a resource sharing request. Need to research if that is really necessary since the request system does not send staff notifications for ILLiad requests. However I think if we give this location a delivery location with an email we won't see these errors any longer.

@kevinreiss kevinreiss self-assigned this Jan 30, 2024
@christinach
Copy link
Member

resolved by pulibrary/bibdata#2305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants