class Rodauth::InternalRequestError

def build_message

def build_message
  extras = []
  extras << reason if reason
  extras << field_errors unless field_errors.empty?
  extras = (" (#{extras.join(", ")})" unless extras.empty?)
  "#{flash}#{extras}"
end

def initialize(attrs)

def initialize(attrs)
  return super if attrs.is_a?(String)
  @flash = attrs[:flash]
  @reason = attrs[:reason]
  @field_errors = attrs[:field_errors] || {}
  super(build_message)
end