Re: Error handling and Powershell
Receive-WinSCPItem is a cmdlet from WinSCP PowerShell Wrapper Module
https://github.com/tomohulk/WinSCP
So please ask there.
Though I assume you can handle its errors as with any other PowerShell cmdlet.
Google for "powershell handle errors".
See for example the
try ... catch construct used in all WinSCP .NET assembly PowerShell (not WinSCP PowerShell Wrapper Module) examples:
https://winscp.net/eng/docs/library_powershell#example