[SERVER-46655] Throw a DBException wherever “code” was appended previously Created: 05/Mar/20 Updated: 06/Dec/22 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Benjamin Caimano (Inactive) | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | 5.0-desired | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Service arch 2020-07-13, Service Arch 2020-08-10, Service Arch 2020-08-24, Service arch 2020-09-07, Service arch 2020-09-21 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Wherever we would append a code field that was not part of a WriteResult subobject, we should instead throw a DBException. In some cases, this may involve encoding additional information into our DBException, but the conversion itself should not be complicated. There may be problems with existing try-catch blocks that encoded into the BSONObj. The solution is to structure a makeGuard() to achieve the catch behavior. |