Logging invalid schemas in production without throwing

8 views
Skip to first unread message

Ian Davis

unread,
Sep 12, 2016, 9:12:57 PM9/12/16
to prismatic...@googlegroups.com
We're currently adding schema validation to a legacy codebase that has relatively little data integrity. I'd like to turn on validation in order to track down places that are calling functions with invalid inputs, but I don't actually want to throw in production. Is there an easy way to log schema validation errors without actually throwing?

Ian

Jason Wolfe

unread,
Sep 13, 2016, 2:08:37 AM9/13/16
to Ian Davis, prismatic-plumbing
As of relatively recently, there is an extension point to do that: 


(Assuming you want to do this with function annotations.  If you just want to do it on data coming in and out of the wire, I would probably just manually roll something with s/checker instead).  

On Tue, Sep 13, 2016 at 4:12 AM, Ian Davis <jung...@gmail.com> wrote:
We're currently adding schema validation to a legacy codebase that has relatively little data integrity. I'd like to turn on validation in order to track down places that are calling functions with invalid inputs, but I don't actually want to throw in production. Is there an easy way to log schema validation errors without actually throwing?

Ian

--
You received this message because you are subscribed to the Google Groups "Plumbing and Graph: the Clojure utility belt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prismatic-plumbing+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages