Skip to content

Test-DbaPath - Handle xp_fileexist execution failures gracefully#10288

Merged
potatoqualitee merged 1 commit into
developmentfrom
claude/issue-10286-20260327-2245
Mar 29, 2026
Merged

Test-DbaPath - Handle xp_fileexist execution failures gracefully#10288
potatoqualitee merged 1 commit into
developmentfrom
claude/issue-10286-20260327-2245

Conversation

@andreasjordan

Copy link
Copy Markdown
Collaborator

When xp_fileexist raises a SQL exception (e.g. for UNC paths the SQL Server service account cannot resolve), wrap ExecuteWithResults in try/catch and return $false instead of crashing with "Cannot index into a null array".

Fixes #10286

Generated with Claude Code

When xp_fileexist raises a SQL exception (e.g. for UNC paths the SQL Server
service account cannot resolve), wrap ExecuteWithResults in try/catch and
return $false instead of crashing with "Cannot index into a null array".

Fixes #10286

(do Test-DbaPath)

Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
@andreasjordan

Copy link
Copy Markdown
Collaborator Author

I think this can be merged as only minor impact.

@potatoqualitee potatoqualitee merged commit 7b349b5 into development Mar 29, 2026
15 checks passed
@potatoqualitee potatoqualitee deleted the claude/issue-10286-20260327-2245 branch March 29, 2026 19:17
@potatoqualitee

Copy link
Copy Markdown
Member

Thank you 😊

potatoqualitee added a commit that referenced this pull request Apr 10, 2026
… (review of #10288)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Copy-DbaDatabase no longer works after azure cert signing was introduced

2 participants