Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create catalog item: The remote server returned an error: (422) #404

Open
lorenzouriel opened this issue Jun 1, 2023 · 1 comment

Comments

@lorenzouriel
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Error when I try to upload a pbix file

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
He creates the session and publish the folder:

# establish session w/ Report Server
$session = New-RsRestSession -ReportPortalUri $serverUrl

# create folder (optional)
New-RsRestFolder -WebSession $session -RsFolder $dashboardFolder -FolderName $dashboardFolder -Verbose

But, when I publish the .pbix file to report server

# upload copy of PBIX to new folder
Write-RsRestCatalogItem -WebSession $session -Path $dashboardtLocalPath -RsFolder /$dashboardFolder -Verbose

Returns a error:

Write-RsRestCatalogItem : System.Exception: Failed to create catalog item: The remote server returned an error: (422) Unprocessable Entity. ---> System.Net.WebException: The remote server 
returned an error: (422) Unprocessable Entity.
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
   --- End of inner exception stack trace ---
At C:\SILO\deploy_pbix_reports.ps1:15 char:1
+ Write-RsRestCatalogItem -WebSession $session -Path $dashboardtLocalPa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-RsRestCatalogItem

What is the expected behavior?
Publish with success

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
No, but i see a bug with the same error open in 2020 - #304

@greenmtnsun
Copy link

I am having this EXACT problem with a fresh install of PBIRS.

I'm using this for Powershell: PSVersion 5.1.14393.6343
I'm using 0.0.8.0 for ReportingServicesTools
For the OS I'm on Windows Server 2016.
For Power BI I'm on January 2023 for both Power BI Desktop and the PBIRS service. On prem, no gateway.

I checked and my experience is as described above. I could really use a fix!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants