Fix returned status codes depending on scenario, provide informative logs
Extend logic of encpoints to provide more informative status codes on different scenarios (not found, bad request, etc). Update logging to write structured and informative logs
This commit is contained in:
@@ -48,6 +48,8 @@ namespace DevOpsProject.HiveMind.Logic.Services
|
||||
};
|
||||
var jsonContent = new StringContent(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json");
|
||||
|
||||
_logger.LogInformation("Attempting to connect Hive. Request: {@request}, URI: {uri}", request, uriBuilder.Uri);
|
||||
|
||||
var retryPolicy = Policy.HandleResult<HttpResponseMessage>(r => !r.IsSuccessStatusCode)
|
||||
.WaitAndRetryAsync(
|
||||
10,
|
||||
|
||||
Reference in New Issue
Block a user