Format numeric HTTP status code in client file transfer error messages
This commit is contained in:
parent
fe879781ab
commit
b8b98994d8
1 changed files with 3 additions and 3 deletions
|
|
@ -1052,7 +1052,7 @@ public class ChatClientConnection : IDisposable
|
|||
else
|
||||
{
|
||||
string errText = await res.Content.ReadAsStringAsync();
|
||||
_state.SetStatus($"Upload failed: {res.StatusCode} - {errText}", 5);
|
||||
_state.SetStatus($"Upload failed: {(int)res.StatusCode} {res.StatusCode} - {errText}", 5);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1074,7 +1074,7 @@ public class ChatClientConnection : IDisposable
|
|||
var res = await _httpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead);
|
||||
if (!res.IsSuccessStatusCode)
|
||||
{
|
||||
_state.SetStatus($"Download failed: {res.StatusCode}", 4);
|
||||
_state.SetStatus($"Download failed: {(int)res.StatusCode} {res.StatusCode}", 4);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1111,7 +1111,7 @@ public class ChatClientConnection : IDisposable
|
|||
else
|
||||
{
|
||||
string errText = await res.Content.ReadAsStringAsync();
|
||||
_state.SetStatus($"Delete failed: {res.StatusCode} - {errText}", 5);
|
||||
_state.SetStatus($"Delete failed: {(int)res.StatusCode} {res.StatusCode} - {errText}", 5);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue