-
Notifications
You must be signed in to change notification settings - Fork 661
Fixing how Get-PnPFile handles removed principals in non-English environments #2852
Fixing how Get-PnPFile handles removed principals in non-English environments #2852
Conversation
update fork
update fork
update fork
update fork
update fork
update fork
update fork
Ideally this would check the ServerErrorCode instead of the error message (or nothing like in this PR). But I'm not sure how reliable this would be - see the related question on Twitter: https://twitter.com/h_ulbricht/status/1295355161469231105?s=20 |
Good point here @heinrich-ulbricht. Didn't think about the lovely localized error messages. I'm not sure myself how reliable the error codes will be. As the exception goes to a fallback scenario effectively still trying to perform the same operation, just without requesting the author field, I think we're okay with the approach you're suggesting here. If the exception would be thrown for other reasons and the same fallback doesn't fix it, it will still throw an exception in the catch and do the same as it would do today. |
…d-principals-in-non-english-environments
Thanks @heinrich-ulbricht ! |
Type
Related Issues?
N/A
What is in this Pull Request ?
This PR allows to use
Get-PnPFile
for files where the author or modifier principal does not exist anymore in the environment. The PR removes the error message check that relies on an English environment. Unfortunately the error message can come back localized so this doesn't really work.fyi @KoenZomers