Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix code broken in ddbe0d15590

Christophe Bliard3e4e8d6fa149
diff --git a/modules/storages/app/services/storages/file_link_sync_service.rb b/modules/storages/app/services/storages/file_link_sync_service.rb
index 16d55e942fa..db460c6d1ef 100644
--- a/modules/storages/app/services/storages/file_link_sync_service.rb
+++ b/modules/storages/app/services/storages/file_link_sync_service.rb
@@ -224,7 +224,11 @@ class Storages::FileLinkSyncService
# or success=false with result=:error or result=:not_authorized.
# rubocop:disable Metrics/AbcSize
def parse_files_info_response(response)
- op_handle_debug "Parse http response: status #{response.code}, body: #{response.body}."
+ if response.is_a?(Net::HTTPResponse)
+ op_handle_debug "Parse http response: status #{response.code}, body: #{response.body}"
+ else
+ op_handle_debug "Parse http response: #{response}"
+ end
return ServiceResult.failure(result: :error) if files_info_response_error?(response)
return ServiceResult.failure(result: :not_authorized) if ["401", "403"].include?(response.code)
return ServiceResult.failure(result: :error) unless response.code == "200" # Interpret any other response as an error