-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
400 instead of 500 on duplicate firewall rule names (#5913)
Closes #5725 This does the check in a helper function in the model file, which feels appropriate. I wasn't sure about raising external API validation errors from the model file, but we do that in a bunch of places: ```console $ rg 'external::Error' nexus/db-model nexus/db-model/src/allow_list.rs 17:use omicron_common::api::external::Error; nexus/db-model/src/role_assignment.rs 9:use omicron_common::api::external::Error; nexus/db-model/src/ipv6.rs 17:use omicron_common::api::external::Error; nexus/db-model/src/saga_types.rs 21:use omicron_common::api::external::Error; nexus/db-model/src/vpc_subnet.rs 76: ) -> Result<(), external::Error> { 81: .map_err(|e| external::Error::invalid_request(e.to_string())) ... there were a bunch more ```
- Loading branch information
1 parent
7fb6cb4
commit 75f5b67
Showing
3 changed files
with
82 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters