public async Task <IActionResult> SignIntegration(string builderId) { var currentUserId = User.Identity.Name; try { var sucess = await _buildersService.SignFicheIntegrationAsync(currentUserId, builderId); if (sucess) { return(Ok(true)); } } catch (UnauthorizedAccessException e) { return(Forbid($"You are not allowed to sign: {e.Message}")); } catch (Exception e) { return(BadRequest(e.Message)); } return(BadRequest("The PDF can't be generated")); }