git.iko.soy/typeable/bloodhound
on master help sign in
Merge pull request #98 from MHova/97-esprotocolexception-docs

no-op: improve EsProtocolException docs around PEBKAC errors

commit2096c3bdbc4c60ec516312907d9bc0bbc05c3355 authorChris Allen <cma@bitemyapp.com> dateSun 31 Jan 2016, 16:11 (11 years ago) parentc115b89fad5f62
1 file changed+7−4
src/Database/Bloodhound/Types.hs+7−4
src/Database/Bloodhound/Types.hs+7−4
@@ -562,10 +562,13 @@ data EsResultFound a = EsResultFound { _version :: DocVersion
562562data EsError = EsError { errorStatus :: Int
563563 , errorMessage :: Text } deriving (Eq, Show, Generic, Typeable)
564564
565−{-| 'EsProtocolException' ideally should never be thrown. It will only
566−be thrown when Bloodhound can't parse a response returned by the
567−ElasticSearch server. This should be reported as a bug to the bug
568−tracker. Be sure to include the body.
565+{-| 'EsProtocolException' will be thrown if Bloodhound cannot parse a response
566+returned by the ElasticSearch server. If you encounter this error, please
567+verify that your domain data types and FromJSON instances are working properly
568+(for example, the 'a' of '[Hit a]' in 'SearchResult.searchHits.hits'). If you're
569+sure that your mappings are correct, then this error may be an indication of an
570+incompatibility between Bloodhound and ElasticSearch. Please open a bug report
571+and be sure to include the exception body.
569572-}
570573data EsProtocolException = EsProtocolException { esProtoExBody :: L.ByteString }
571574 deriving (Eq, Show, Generic, Typeable)