-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
We recently had an issue reported in which a user tried to use the cause
property with a non-error type object. This should be expected behavior in javascript.
In order to support a dynamic data structure, a slack discussion brought us to the following proposal:
- Add a new
context
(name to decided) property in thecauses.items.properties
schema. - The properties
class
,message
,backtrace
will have to become optional. - In the case of the javascript issue above, we would put the JSON result of the non-error type cause object as the data for the
context
property. The other properties (class
,message
,backtrace
) will not have any value. - For Ruby, we already have support for a
context
on the main error/exception. This context is merged with the global context. For each error/exception in the nested causes, we could add their context in this new property.
Obviously, this implies that work will have to be done on the backend (?) and Honeybadger UI to support this new property and the dynamic data structure of a cause
object. For example, the following block only works when the cause item has the properties class
, message
, backtrace
. We will have to modify to support cases where these properties are not set or when the context
property has a value, which will be a dynamic JSON structure.
Let me know what you think!
cc @joshuap
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request