Sha256: 5b4abdb319b9ad6ae3b5b3fb1804a785d9068aab4a20323812fe6609a6f55c48
Contents?: true
Size: 379 Bytes
Versions: 15
Compression:
Stored size: 379 Bytes
Contents
class SiteHub module Middleware class ErrorHandling ERROR_RESPONSE = Rack::Response.new(['error'], 500, {}) attr_reader :app def initialize(app) @app = app end def call(env) @app.call env rescue StandardError => exception env[ERRORS] << exception.message ERROR_RESPONSE.dup end end end end
Version data entries
15 entries across 15 versions & 1 rubygems