[CDRIVER-1802] Report specific keys for invalid update documents Created: 18/Oct/16  Updated: 19/Oct/16  Resolved: 18/Oct/16

Status: Closed
Project: C Driver
Component/s: errors
Affects Version/s: None
Fix Version/s: 1.5.0

Type: Improvement Priority: Major - P3
Reporter: David Golden Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If an update document includes non dollar sign keys, the error message is generic: "update only works with $ operators".

It would help users understand the message if it included the name of the invalid key. E.g. "Invalid key 'foo': update only works with $ operators"

This request is inspired by the user support question in CXX-1090. A clearer message might have allowed the user to answer their own question without a ticket.



 Comments   
Comment by Githook User [ 18/Oct/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1802: Improve error message
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/307daaa568392aa2e9dfcbc75ebfbd7075027086

Generated at Wed Feb 07 21:13:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.