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

Fix exception in Get-PnPDiagnostics #1380

Merged
merged 2 commits into from
Nov 25, 2021

Conversation

jackpoz
Copy link
Contributor

@jackpoz jackpoz commented Nov 24, 2021

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

No related issues

What is in this Pull Request ?

Fix an exception in Get-PnPDiagnostics happening when PowerShell $Error variable had entries of a different type than ErrorRecord, i.e. System.Management.Automation.ParameterBindingValidationException.
The checks have been copied from Get-PnPException, in particular the FirstOrDefault(e => e is ErrorRecord) filter.

This is how the error looked. I don't have anymore how-to-reproduce steps.
image

Guidance

  • You can delete this section when you are submitting the pull request.*
  • Please update this PR information accordingly. We use this as part of our release notes in monthly communications.
  • Please target your PR to Dev branch. If you do not target the Dev branch we will not accept this PR.

jackpoz and others added 2 commits November 24, 2021 11:38
Fix exception in Get-PnPDiagnostics happening when PowerShell $Error variable had entries of a different type than ErrorRecord, i.e. System.Management.Automation.ParameterBindingValidationException
@KoenZomers
Copy link
Collaborator

Thanks @jackpoz !

@KoenZomers KoenZomers merged commit 543b768 into pnp:dev Nov 25, 2021
@jackpoz jackpoz deleted the fixes/get-diagnostics-error branch December 4, 2022 15:10
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

Successfully merging this pull request may close these issues.

2 participants