We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73db9c2 commit bd74b82Copy full SHA for bd74b82
lib/pact_broker/api/resources/base_resource.rb
@@ -84,7 +84,7 @@ def handle_exception e
84
end
85
86
def params
87
- @params ||= JSON.parse(request.body.to_s, {symbolize_names: true}.merge(PACT_PARSING_OPTIONS))
+ @params ||= JSON.parse(request.body.to_s, { symbolize_names: true }.merge(PACT_PARSING_OPTIONS)) #Not load! Otherwise it will try to load Ruby classes.
88
89
90
def params_with_string_keys
@@ -123,7 +123,7 @@ def pacticipant_name
123
124
def invalid_json?
125
begin
126
- JSON.parse(request_body, PACT_PARSING_OPTIONS) #Not load! Otherwise it will try to load Ruby classes.
+ params
127
false
128
rescue StandardError => e
129
logger.info "Error parsing JSON #{e} - #{request_body}"
0 commit comments