Skip to content

Commit

Permalink
status code 201: resource created
Browse files Browse the repository at this point in the history
  • Loading branch information
giantimi committed Feb 1, 2024
1 parent 74c34b7 commit 95c2eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exec/TXG.hs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ esCheckIndex mgr logger esConf version = do
return $ Right ()
_ -> do
let indexCreated = object ["acknowledged" .= True, "shards_acknowledged" .= True, "index" .= indexName ]
if val == indexCreated && status == 200
if val == indexCreated && (status == 200 || statusCode == 201)
then liftIO $ loggerFunIO logger Info $ "Index " <> T.pack indexName <> " created"
else throwM $ ElasticSearchException $ "esCheckIndex: Unexpected response: " <> T.pack (show val)
return $ Right ()
Expand Down

0 comments on commit 95c2eb0

Please sign in to comment.