You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes in the response that PagedDocument gets from a FindPagedDocumentSeriesReferences request, the resulting first page is empty. This causes a NoMethodError when accessing the first document -- first_page.first ends up being nil.
There's probably a bigger question of why requests are being made for zero-document responses, but within this codebase it might be good to return early with something like
return {paging: nil, pages: 1, documents: []} if first_page.empty?
I think we want to distinguish between zero pages and one page with no documents. We want to re-try if there are zero pages, so good to communicate that to the caller. Maybe with an exception?
Sometimes in the response that PagedDocument gets from a FindPagedDocumentSeriesReferences request, the resulting first page is empty. This causes a NoMethodError when accessing the first document --
first_page.first
ends up being nil.There's probably a bigger question of why requests are being made for zero-document responses, but within this codebase it might be good to return early with something like
https://sentry.ds.va.gov/department-of-veterans-affairs/efolder/issues/8508/?referrer
The text was updated successfully, but these errors were encountered: