Announcement Announcement Module
Collapse
No announcement yet.
How to tell if a MongoTemplate operation fails Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to tell if a MongoTemplate operation fails

    I'm new to Spring Data and MongoDB, but I noticed that none of the MongoTemplate's methods give you any indication that an operation failed. For instance, I'm trying to update a document, and in my application, it looked like everything looked fine because mongoTemplate.save(obj) just returned like it worked. Come to find out when I looked in the mongo logs, it is failing because of an indexing exception. Is there anyway to tell if a query, insert, update, etc just plain failed?

    Thanks
Working...
X