"The error message [API 422]" instead of "#<RuntimeError: API error
422: The error message>"
refs #1880
if @object.andand.errors.andand.full_messages.andand.any?
@errors = @object.errors.full_messages
else
- @errors = [e.inspect]
+ @errors = [e.to_s]
end
self.render_error status: 422
end
if msg.status_code != 200
errors = resp[:errors]
errors = errors.join("\n\n") if errors.is_a? Array
- raise "API error #{msg.status_code}:\n\n#{errors}\n"
+ raise "#{errors} [API: #{msg.status_code}]"
end
if resp[:_profile]
Rails.logger.info "API client: " \