Given an error chain that may contain *PathError, which use of errors.As is correct?

from Error handling
Go 1.27 intermediate 1 min

Given an error chain that may contain *PathError, which use of errors.As is correct?

Report an error