added process error type parameter