framed-data / overseer

Overseer is a library for building and running data pipelines in Clojure.
Eclipse Public License 1.0
97 stars 10 forks source link

Ex handlers: filter out invalid ex-data #29

Closed andrewberls closed 9 years ago

andrewberls commented 9 years ago

Overseer uses user-supplied ex-data as additional metadata when sending errors to Sentry. However, values are serialized as JSON when sending over the wire, so we need to ensure we only attempt to send serializable values in the first place. We've seen bugs where, e.g. prismatic/schema fails validation on a datatype and includes the value in the ex-data, causing serialization errors.

Before, something like

(throw (ex-info "" {:foo 1 :bar (Object.)}))

would cause the failure. Now, invalid keys/values are simply stripped out of the data map.

elliot42 commented 9 years ago

:+1: pending the "use nil to represent and check 'nothing was here' instead of empty map"

elliot42 commented 9 years ago

:+1: