public async Task <IActionResult> SelectSpecificationForFunding(string specificationId) { Guard.IsNullOrWhiteSpace(specificationId, nameof(specificationId)); if (!await _authorizationHelper.DoesUserHavePermission(User, specificationId, SpecificationActionTypes.CanChooseFunding)) { return(new ForbidResult()); } HttpStatusCode statusCode = await _specsClient.SelectSpecificationForFunding(specificationId); if (statusCode == HttpStatusCode.NoContent) { return(NoContent()); } throw new InvalidOperationException($"An error occurred while retrieving code context. Status code={statusCode}"); }