Sha256: 8d6f3088b209458a6854bea2187985d433472eb4dc30d144bbdae22e23b21739
Contents?: true
Size: 629 Bytes
Versions: 6
Compression:
Stored size: 629 Bytes
Contents
module Alephant module Broker class ErrorComponent attr_reader :batch_id, :content, :id, :options, :status def initialize(meta, status, exception) @batch_id = meta.batch_id @status = status @content = content_for exception @id = meta.id @options = {} end def content_type headers['Content-Type'] end def headers { 'Content-Type' => 'text/plain' } end private def content_for(exception) "#{exception.message}\n#{exception.backtrace.join('\n')}" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems