1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

PM-10600: Throw Xunit assert exception when sending request via BaseIdentityClientService

SendAsync in BaseIdentityClientService never throws exception. Ideally this behaviour should be changed, and the method should throw error on any failure, but it's not in scope of change.
Will be fixed by PM-14675
This commit is contained in:
Maciej Zieniuk 2024-11-09 14:28:31 +00:00
parent 98fbe1f110
commit 7bea641b0e
No known key found for this signature in database
GPG Key ID: 9CACE59F1272ACD9

View File

@ -90,6 +90,12 @@ public abstract class BaseIdentityClientService : IDisposable
catch (Exception e)
{
_logger.LogError(12334, e, "Failed to send to {0}.", message.RequestUri.ToString());
// Throw for testing purposes
// TODO Fixed by https://bitwarden.atlassian.net/browse/PM-14675
if (e.GetType().Namespace?.StartsWith("Xunit") ?? false)
{
throw;
}
return default;
}
}