Class: Moonbase::Models::Error

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/error.rb

Defined Under Namespace

Classes: Source

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: nil, code: nil, detail: nil, meta: nil, source: nil, status: nil, title: nil, type: :error) ⇒ Object

Some parameter documentations has been truncated, see Moonbase::Models::Error for more details.

The Error object represents a single error that occurred during API request processing. It provides detailed information about what went wrong, including a unique identifier, status code, and human-readable descriptions to help developers understand and resolve the issue.

Parameters:

  • id (String) (defaults to: nil)

    A unique identifier for this specific error instance.

  • code (String) (defaults to: nil)

    An application-specific error code string.

  • detail (String) (defaults to: nil)

    A human-readable explanation of this specific error.

  • meta (Hash{Symbol=>Object}) (defaults to: nil)
  • source (Moonbase::Models::Error::Source) (defaults to: nil)

    An object containing more specific information about the part of the request tha

  • status (String) (defaults to: nil)

    The HTTP status code for this problem, as a string.

  • title (String) (defaults to: nil)

    A short, human-readable summary of the problem.

  • type (Symbol, :error) (defaults to: :error)


# File 'lib/moonbase/models/error.rb', line 53

Instance Attribute Details

#codeString?

An application-specific error code string.

Returns:

  • (String, nil)


21
# File 'lib/moonbase/models/error.rb', line 21

optional :code, String

#detailString?

A human-readable explanation of this specific error.

Returns:

  • (String, nil)


27
# File 'lib/moonbase/models/error.rb', line 27

optional :detail, String

#idString?

A unique identifier for this specific error instance.

Returns:

  • (String, nil)


15
# File 'lib/moonbase/models/error.rb', line 15

optional :id, String

#metaHash{Symbol=>Object}?

Returns:

  • (Hash{Symbol=>Object}, nil)


32
# File 'lib/moonbase/models/error.rb', line 32

optional :meta, Moonbase::Internal::Type::HashOf[Moonbase::Internal::Type::Unknown]

#sourceMoonbase::Models::Error::Source?

An object containing more specific information about the part of the request that caused the error.



39
# File 'lib/moonbase/models/error.rb', line 39

optional :source, -> { Moonbase::Error::Source }

#statusString?

The HTTP status code for this problem, as a string.

Returns:

  • (String, nil)


45
# File 'lib/moonbase/models/error.rb', line 45

optional :status, String

#titleString?

A short, human-readable summary of the problem.

Returns:

  • (String, nil)


51
# File 'lib/moonbase/models/error.rb', line 51

optional :title, String

#typeSymbol, :error

Returns:

  • (Symbol, :error)


9
# File 'lib/moonbase/models/error.rb', line 9

required :type, const: :error