Fix after Psi upstream changes in error type handling