I have not done much with the new errors stuff, but I'll try to help.
These new error functions, Is() and As() are about error types. It looks
like you are trying to transform an error of type PathErr into another
error of type PathErr with a different value. That's not how it works.
I think most of the time As() will work because the error wraps another error of a different type. In that case the error should implement Unwrap() not As(). If your error encapsulates multiple error types, then you would need to implement As(). At least that is my understanding. For example, taking your code, and modifying it, so that PathErr can also be treated as an OtherErr could look like
https://play.golang.org/p/qa4VU0PEP3v. But again, since there is only one type encompassed in PathErr, I think this might be more easily done with Unwrap like this:
https://play.golang.org/p/v4gDgtlNxcQ
Good luck.