Project

General

Profile

Actions

Bug #37380

closed

Container push can fail with a different JSON error

Added by Ian Ballou 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

In http_resource.rb, there's the following code:

def issue_request(method:, path:, headers: {}, payload: nil)
logger.debug("Resource #{method.upcase} request: #{path}")
logger.debug "Headers: #{headers.to_json}"
begin
logger.debug "Body: #{filter_sensitive_data(payload.to_json)}"
rescue JSON::GeneratorError
logger.debug "Body: Error: could not render payload as json"
end

The last logger.debug might cause an Encoding::UndefinedConversionError error instead of a JSON::GeneratorError.

Actions

Also available in: Atom PDF