Sha256: 1af46005c0a06408147887b39e756ff7b4a9382d36e95fad0edb08edd780b134

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

require 'mkit/exceptions'

module MKIt
  class Server < Sinatra::Base
    set :default_content_type, :json
    set :dump_errors, true
    set :show_exceptions, false
    set :raise_errors, false

    error MKIt::BaseException do |e|
      MKItLogger.debug e
      error e.error_code, e.message
    end

    error do |e|
      MKItLogger.debug e
      error 500, "Internal server error: #{e.message}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mkit-0.4.1 lib/mkit/app/mkit_server.rb