# frozen_string_literal: true require_relative 'immutable_object' module Upgrow # An Error is an all-purpose object that represents a failure in the # performance of an Action. Errors are present in failure Results. # # Error contains a code, which is a machine-friendly unique key that # represents the type of error returned. Error also contain a message, which # is the human-readable text explaining the particular failure that happened. # Optinally Error might also have an attribute value, which is the attribute # that caused the failure, in case the error was originated from an Input. class Error < ImmutableObject attribute :code attribute :message attribute :attribute end end