Commit 25f18d7c authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[api] fix to_json for GargError

parent 376f3410
Pipeline #3403 canceled with stage
......@@ -29,6 +29,7 @@ import Control.Monad.Reader (ReaderT)
import Control.Monad.Error.Class (MonadError(..))
import Crypto.JOSE.Error as Jose
import Data.Aeson.Types
import qualified Data.Text as Text
import Data.Typeable
import Data.Validity
import Gargantext.API.Admin.Orchestrator.Types
......@@ -115,7 +116,7 @@ data GargError
makePrisms ''GargError
instance ToJSON GargError where
toJSON _ = String "SomeGargErrorPleaseReport"
toJSON err = object [("error", String $ Text.pack $ show err)]
instance Exception GargError
......
......@@ -289,7 +289,7 @@ addCorpusWithForm user cid =
serveJobsAPI AddCorpusFormJob $ \i log' ->
let
log'' x = do
printDebug "[addToCorpusWithForm] " x
--printDebug "[addToCorpusWithForm] " x
liftBase $ log' x
in New.addToCorpusWithForm user cid i log'' (jobLogInit 3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment