1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-06-26 10:36:21 +02:00

remove re-throws of exceptions, hiding stack trace (#1680)

* remove re-throws of exceptions, hiding stack trace

* revert to catch all ApiExceptions

* add back throw in auditService

* whitespace
This commit is contained in:
Jake Fink 2021-12-16 15:34:33 -05:00 committed by GitHub
parent adb8bb4f1b
commit ad3b401ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -55,7 +55,7 @@ namespace Bit.Core.Services
{ {
return new List<BreachAccountResponse>(); return new List<BreachAccountResponse>();
} }
throw e; throw;
} }
} }
} }

View File

@ -272,7 +272,7 @@ namespace Bit.Core.Services
{ {
if (e.Error == null || e.Error.StatusCode != System.Net.HttpStatusCode.NotFound) if (e.Error == null || e.Error.StatusCode != System.Net.HttpStatusCode.NotFound)
{ {
throw e; throw;
} }
} }
return await _cryptoService.MakeKeyAsync(masterPassword, email, kdf, kdfIterations); return await _cryptoService.MakeKeyAsync(masterPassword, email, kdf, kdfIterations);

View File

@ -732,7 +732,7 @@ namespace Bit.Core.Services
catch (ApiException e) catch (ApiException e)
{ {
await DeleteAttachmentAsync(id, attachmentId); await DeleteAttachmentAsync(id, attachmentId);
throw e; throw;
} }
} }

View File

@ -219,12 +219,12 @@ namespace Bit.Core.Services
{ {
response = await LegacyServerSendFileUpload(request, send, encryptedFileData); response = await LegacyServerSendFileUpload(request, send, encryptedFileData);
} }
catch (Exception e) catch
{ {
if (response != default){ if (response != default){
await _apiService.DeleteSendAsync(response.Id); await _apiService.DeleteSendAsync(response.Id);
} }
throw e; throw;
} }
break; break;
default: default: