Exemplo n.º 1
0
            public async Task NotifyErrorAsync(LocationConfigurationError error)
            {
                var client = await clientFactory();

                var json = JsonConvert.SerializeObject(error);
                HttpResponseMessage res = await client.PutAsync($"api/{userId}/location/error",
                                                                new StringContent(json, Encoding.UTF8, "application/json"));

                if (!res.IsSuccessStatusCode)
                {
                    throw new DigitServiceException($"Could notify location configuration error: {res.StatusCode}");
                }
            }
        public async Task <IActionResult> Put([FromBody] LocationConfigurationError error)
        {
            await logger.LogForUser(User.GetId(), "Location configuration error", logLevel : LogLevel.Error);

            return(Ok());
        }