class FlexColumns::Errors::JsonTooLongError

Raised when you try to store enough data in a flex column that the generated JSON is too long to fit into the column.

Attributes

data_source[R]
json_string[R]
limit[R]

Public Class Methods

new(data_source, limit, json_string) click to toggle source
Calls superclass method
# File lib/flex_columns/errors.rb, line 75
      def initialize(data_source, limit, json_string)
        @data_source = data_source
        @limit = limit
        @json_string = json_string

        super(%{When trying to serialize JSON for #{data_source.describe_flex_column_data_source},
the JSON produced was too long to fit in the database.
We produced #{json_string.length} characters of JSON, but the
database's limit for that column is #{limit} characters.

The JSON we produced was:

  #{FlexColumns::Util::StringUtils.abbreviated_string(json_string)}})
      end