diff --git a/lib/pathway.rb b/lib/pathway.rb index dbb5cc5..7f88c8f 100644 --- a/lib/pathway.rb +++ b/lib/pathway.rb @@ -33,10 +33,6 @@ class Error < StandardError @default_messages = {} - alias :error_type :type - alias :error_message :message - alias :errors :details - def initialize(type:, message: nil, details: nil) @type = type.to_sym @message = message || default_message_for(type) diff --git a/lib/pathway/version.rb b/lib/pathway/version.rb index 91d9949..a9957a5 100644 --- a/lib/pathway/version.rb +++ b/lib/pathway/version.rb @@ -1,3 +1,3 @@ module Pathway - VERSION = '0.0.18' + VERSION = '0.0.19' end diff --git a/spec/plugins/responder_spec.rb b/spec/plugins/responder_spec.rb index 0a4c533..ef072b0 100644 --- a/spec/plugins/responder_spec.rb +++ b/spec/plugins/responder_spec.rb @@ -60,8 +60,8 @@ def call(_input) RespOperation.call(context, input) do success { |value| "Returning: " + value } failure(:forbidden) { |error| "Forbidden" } - failure(:validation) { |error| "Invalid: " + error.errors.join(", ") } - failure { |error| "Other: " + error.errors.join(" ") } + failure(:validation) { |error| "Invalid: " + error.details.join(", ") } + failure { |error| "Other: " + error.details.join(" ") } end end