[DOCS-15374] Investigate changes in SERVER-64416: Have view creation return the same error as collection creation Created: 30/May/22  Updated: 13/Nov/23  Resolved: 12/Sep/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: 6.1.0
Fix Version/s: 6.1.0-rc0, 6.0.1, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-64416 Have view creation return the same er... Closed
Participants:
Days since reply: 1 year, 21 weeks, 2 days ago
Epic Link: DOCSP-21764

 Description   
Original Downstream Change Summary

View creation now returns NamespaceExists instead of code 17399 when there is a namespace conflict.

Description of Linked Ticket

Currently creating a view would returns an error code 17399 instead of `NamespaceExists` error in case of namespace collision. Since view creation and collection creation use the same API, returning different errors would be confusing to users and they could easily miss catching this error in their code. so we should have view creation return the same error as collection creation to make them consistent. This ticket can also investigate if we return inconsistent errors in other cases in addition to namespace collision.

> db.runCommand({create: "bar", viewOn: "aaa", pipeline: []})
{
	"ok" : 0,
	"errmsg" : "Cannot create collection test.bar - collection already exists.",
	"code" : 17399,
	"codeName" : "Location17399"
}



 Comments   
Comment by Ashley Brown [ 12/Sep/22 ]

Nothing to document here, since we don't currently handle troubleshooting information.

Comment by Education Bot [ 20/Aug/22 ]

Fix Version updated for upstream SERVER-64416:
6.0.1, 6.1.0-rc0

Comment by Education Bot [ 19/Aug/22 ]

Fix Version updated for upstream SERVER-64416:
6.0.1

Comment by Education Bot [ 25/Jul/22 ]

Fix Version updated for upstream SERVER-64416:
6.1.0-rc0, 6.0.1

Comment by Education Bot [ 30/May/22 ]

Fix Version updated for upstream SERVER-64416:
6.1.0-rc0

Generated at Thu Feb 08 08:12:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.