Fork me on GitHub
#pathom
<
2020-03-19
>
kwladyka22:03:25

How do you return errors for request? let say somebody send uuid with value abc which is invalid data. I want to return something like

{:logs [{:type :error,
         :code :validation,
         :message {[:shop/uuids :shop/uuid] "UUID has to be in valid format (for example 00000000-0000-0000-0000-000000000000).",
                   [:shop/uuids] "foo"}}]}
Do I have to add this to each ::pc/output ?

souenzzo22:03:37

You may implement a custom error-handler-plugin

👍 4