[SERVER-46652] Convert DbResponse to have a validated ctor 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 | ||||||||
| Participants: | |||||||||
| Description |
|
DbResponse currently uses default and list constructors. The default constructor is used for stack initialization only—it should go away in favor of boost::optional<DbResponse>. We should add additional constructors that validate and otherwise convert their arguments into a valid DbResponse. In short, when you have a DbResponse in hand, it should be valid enough to send back to return to a user. |