public IActionResult CreateJob(CreateJobModel model) { try { _logger.LogDebug($"Endpoint: \"JobManagement\" Method: \"CreateJob\" Parameters: \"{model}\""); ValidationResult validationResult = new JobManagementValidator(model).Validate(); if (!validationResult.IsValid) { ExceptionHandler.ThrowProperExternalException(new InputValidationException(validationResult.Message)); } return(Ok(_service.CreateJob(model.JobSpecification, model.SessionCode))); } catch (Exception e) { return(BadRequest(e.Message)); } }