Sha256: a16d6af2d7a9ca9e1564ce2f6eadba85d950961af19894efdd20c1dfd5c58c0c

Contents?: true

Size: 363 Bytes

Versions: 35

Compression:

Stored size: 363 Bytes

Contents

class ErrorHandler < RubyPitaya::HandlerBase

  non_authenticated_actions :getError

  def getError
    error_code = RubyPitaya::StatusCodes::CODE_ERROR
    error_message = "Some Error"

    raise RubyPitaya::RouteError.new(error_code, error_message)

    response = {
      code: StatusCodes::CODE_OK,
      data: {
        message: 'Ok!'
      }
    }
  end
end

Version data entries

35 entries across 31 versions & 1 rubygems

Version Path
rubypitaya-3.19.6 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.19.5 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.19.4 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.19.3 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.19.2 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.19.1 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.19.0 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.18.0 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.17.2 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.17.1 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.17.0 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.16.0 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.15.3 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.15.2 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.15.1 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.15.0 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.14.0 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.13.1 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.13.0 ./lib/rubypitaya/app-template/app/handlers/error_handler.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/app/handlers/error_handler.rb