1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 14:53:18 +00:00

Vault add/edit/view site updates to table section/cell display.

This commit is contained in:
Kyle Spearrin
2016-06-13 20:03:16 -04:00
parent baeee00a8d
commit 8108f4023a
9 changed files with 101 additions and 49 deletions

View File

@@ -27,15 +27,18 @@ namespace Bit.App.Repositories
{
try
{
var responseContent = await response.Content.ReadAsStringAsync();
var errorResponseModel = JsonConvert.DeserializeObject<ErrorResponse>(responseContent);
var errors = new List<ApiError>();
foreach(var valError in errorResponseModel.ValidationErrors)
if(response.StatusCode == System.Net.HttpStatusCode.BadRequest)
{
foreach(var errorMessage in valError.Value)
var responseContent = await response.Content.ReadAsStringAsync();
var errorResponseModel = JsonConvert.DeserializeObject<ErrorResponse>(responseContent);
foreach(var valError in errorResponseModel.ValidationErrors)
{
errors.Add(new ApiError { Message = errorMessage });
foreach(var errorMessage in valError.Value)
{
errors.Add(new ApiError { Message = errorMessage });
}
}
}