Commit 0d6763e2 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[metrics] fix ServerError

parent 7ac399b1
......@@ -23,6 +23,7 @@ import qualified Data.Map as Map
import Data.Time (UTCTime)
import Data.Text (Text)
import Servant
import Servant.Server.Internal.ServerError (ServerError(..))
import Gargantext.API.HashedResponse
import Gargantext.API.Ngrams
......@@ -91,7 +92,7 @@ getScatter cId maybeListId tabType _maybeLimit mhHash = do
-- TODO send 304 if hashes equal, 200 with response otherwise
if mhHash == (Just $ hash r) then
throwError $ ServantErr { errHTTPCode = 304
throwError $ ServerError { errHTTPCode = 304
, errReasonPhrase = "Hashes match"
, errBody = ""
, errHeaders = []}
......
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