title: JacksonDBDecoder - Server errors from MongoDB - mongojack 2.3.0
body: <p>I have a problem when my application receives an error from MongoDB server, for example:</p>
  
  <p>Imagine that I do a find in MongoDB but the response from MongoDB Server is an error because of a timeout:</p>
  
  <p>{ 
  $err: "MongoTimeout due to...bla bla bla..."
  code: 50
  }</p>
  
  <p>JacksonDBDecoder is expecting my Java type for example my class "Stuff" (that contains several fields like "price" and "weight"), but when it receives the previous JSON, then there is not any matching fields with "price" and "weight", so the outcome is empty: { }</p>
  
  <p>The empty JSON will be processed by the mongo-java-driver classes (com.mongodb.QueryResultIterator.throwOnQueryFailure exactly) and it will never log the original information "MongoTimeout due to...bla bla bla..." and 50, because the decoder could not understand the JSON from MongoDB Server.</p>
  
  <p>Could you help me to configure mongojack or Jackson to handle this types of responses from MongoDB Server?</p>
  
  <p>Many thanks.</p>
  
  <p>Regards,
  Paco.</p>