corvus-dotnet / corvus-dotnet/Corvus.Tenancy
ITenantProvider.GetTenantAsync throws exception for common case
- Dominant language
- C#
- Stars
- 6
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the `ITenantProvider.GetTenantAsync` method throws a `TenantNotModifiedException` if the stored tenant's etag matches the etag passed in.
This is likely to be the most common outcome—tenants are fetched all the time but are not modified very often. So not only are we using an exception to signal a fairly common result (which violates the .NET Framework design guidelines), we're doing so in the most common case!
It would arguably be more sensible for the returned task to produced `null` if the etag matches. We're not currently using a `null` result to signify anything else. (We throw a different exception in the case where there's no tenant with the specified id.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.