public IActionResult Delete(int id) { try { if (responseManager.Get(id) == null) { return(NotFound(id)); } responseManager.Delete(id); } catch (Exception ex) { logger.LogError($"Failed to delete response {id}: {ex}"); return(BadRequest(config["Error:Default"])); } return(NoContent()); }