public IActionResult HandledException(string input) { AddCorrelationIdentifierToResponse(); try { throw new Exception("Exception thrown and caught"); } catch (Exception ex) { SampleHelpers.TrySetExceptionOnActiveScope(ex); return(StatusCode(500, new { user_message = "There was an error, returning 500: " + ex.Message })); } }