Skip to content

Commit

Permalink
Adds a log entry on FilesInfoQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
mereghost committed Aug 29, 2024
1 parent e5c4cbb commit 2a9b43d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def call(auth_strategy:, file_ids:)
return ServiceResult.success(result: [])
end

info "Retrieving file information for #{file_ids.join(', ')}"
http_options = Util.ocs_api_request.deep_merge(Util.accept_json)
Authentication[auth_strategy].call(storage: @storage, http_options:) do |http|
parsed_response = files_info(http, file_ids).on_failure { return _1 }.result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,20 @@ def call(auth_strategy:, file_ids:)
)
end

result = Array(file_ids).map do |file_id|
file_info_result = FileInfoQuery.call(storage: @storage, auth_strategy:, file_id:)
with_tagged_logger do
info "Retrieving file information for #{file_ids.join(', ')}"
result = Array(file_ids).map do |file_id|
file_info_result = FileInfoQuery.call(storage: @storage, auth_strategy:, file_id:)

file_info_result.on_failure do |failed_result|
return failed_result if failed_result.error_source.module_parent == AuthenticationStrategies
file_info_result.on_failure do |failed_result|
return failed_result if failed_result.error_source.module_parent == AuthenticationStrategies
end

wrap_storage_file_error(file_id, file_info_result)
end

wrap_storage_file_error(file_id, file_info_result)
ServiceResult.success(result:)
end

ServiceResult.success(result:)
end

private
Expand Down

0 comments on commit 2a9b43d

Please sign in to comment.