class GraphQL::FloatEncodingError
This error is raised when Types::Float is asked to return a non-finite value.
Attributes
Returns
-
GraphQL::Schema::Field— The field that returned a non-finite float
The value which couldn’t be encoded
Public Class Methods
Source
# File lib/graphql/float_encoding_error.rb, line 19 def initialize(value, context:) @float_value = value @field = context[:current_field] @path = context[:current_path] message = "Float is not finite: #{value.inspect}".dup if @path message << " @ #{@path.join(".")}" end if @field message << " (#{@field.path})" end super("#{message}.") end
Calls superclass method