class Virtuaservices::Utils::Errors::HTTPError

Standard class parent to all specialized http errors. @author Vincent Courtois <courtois.vincent@outlook.com>

Attributes

action[RW]

@!attribute [rw] action

@return [String] the name of the action the user was trying to perform on the model (often crate or update).
error[RW]

@attribute [rw] error

@return [String] the label of the error returned by the model.
field[RW]

@!attribute [rw] field

@return [String, Symbol] the name of the field in error in the model.
status[RW]

@attribute [rw] status

@return [Integer] the HTTP status code as a number (eg: 400, 422 or 500)

Public Class Methods

new(action, field, error, status) click to toggle source
# File lib/virtuaservices/utils/errors/http_error.rb, line 21
def initialize (action, field, error, status)
  @action = action
  @field = field.to_s
  @error = error
  @status = status
end