class

Honeybadger::Payload

Inherits Reference < Object

A Payload is a json renderable object which conforms to the honeybadger json schema for exceptions

This payload provides a baseline for general use and is intended to be extended by framework or application specific uses to fill in details.

Constants

STACK_FRAME = /^ (?<path>[^:]+) # filename :(?<line>[\d]+) # line number :(?<char>[\d]+) # character offset \sin\s # fixed seperator '(?<method>[^']+)' # method name $/x

Constructors

new(exception : Exception)

Subclasses of Payload must set @exception, but will likely need to take additional parameters.

Source

Instance methods

context_json(builder)

Renders request context provided by http middleware.

Source
exception

The exception to be rendered.

Source
request_json(builder)

A basic request object contains just a context object. Override this to embed actual request details.

Source
set_context(hash_context : Hash) : Nil

Allows manually appending context

Source
to_json(builder : JSON::Builder)

Renders the complete json payload.

Source