catch (Exception ex) { _logger.LogError(ex.ToString()); Response.AddApplicationError(ex.Message); return StatusCode(500, ex.Message); }